/**
 * Year Calendar Public CSS
 */

/**
 * Year Calendar Container - use more specific selectors to prevent conflicts
 */
.year-calendar-container {
    margin: 0 auto;
    padding: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    /* Set default values for CSS variables with specific namespacing */
    --year-calendar-accent-color: #505050;
    --year-calendar-accent-hover-color: #3a3a3a;
    --year-calendar-button-color: #3498db;
    --year-calendar-button-hover-color: #2980b9;
    --year-calendar-button-font: "Segoe UI", Roboto, -apple-system, sans-serif;
    --year-calendar-button-text-color: #ffffff;
    --year-calendar-button-icon-color: #ffffff;
    --year-calendar-holiday-color: #ffcccc;
    --year-calendar-observance-color: #ffeb99;
    --year-calendar-special-color: #cce8ff;
    --year-calendar-user-event-color: #d1f8d1;
    --year-calendar-today-color: #505050;
    --year-calendar-month-name-color: #5F5F5F;
    --year-calendar-holiday-text-color: #d9534f;
    --year-calendar-observance-text-color: #5cb85c;
    --year-calendar-special-text-color: #5bc0de;
    /* Force the container to fill its parent container */
    display: block;
    overflow: visible;
    position: relative;
}

/**
 * Year Calendar Toolbar
 */
.year-calendar-container .year-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.year-calendar-container .year-calendar-navigation {
    flex: 1;
}

.year-calendar-container .year-calendar-navigation.year-calendar-prev {
    text-align: left;
}

.year-calendar-container .year-calendar-navigation.year-calendar-next {
    text-align: right;
}

.year-calendar-container .year-calendar-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Updated button styles to match main plugin but with specific selectors */
.year-calendar-container .year-calendar-nav-button,
.year-calendar-container .year-calendar-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #505050;
    box-shadow: none;
}

.year-calendar-container .year-calendar-action-button {
    width: auto;
    height: auto;
    padding: 8px;
}

/* Add specific styles for print button as anchor tag */
.year-calendar-container a.year-calendar-action-button.print-calendar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 8px;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1;
}

.year-calendar-container .year-calendar-nav-button:hover,
.year-calendar-container .year-calendar-action-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #333;
    box-shadow: none;
}

.year-calendar-container .year-calendar-nav-button.prev-year {
    float: left;
}

.year-calendar-container .year-calendar-nav-button.prev-year i {
    margin-right: 8px;
    color: #505050;
}

.year-calendar-container .year-calendar-nav-button.next-year {
    float: right;
}

.year-calendar-container .year-calendar-nav-button.next-year i {
    margin-left: 8px;
    color: #505050;
}

.year-calendar-container .year-calendar-action-button i {
    font-size: 16px;
    color: #505050;
}

/* Ensure the icon in the print button anchor is centered */
.year-calendar-container a.year-calendar-action-button.print-calendar i {
    font-size: 16px;
    color: #505050;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Add specific styles for download printable calendar button as anchor tag */
.year-calendar-container a.year-calendar-action-button.download-printable-calendar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 8px;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1;
}

/* Ensure the icon in the download printable calendar button anchor is centered */
.year-calendar-container a.year-calendar-action-button.download-printable-calendar i {
    font-size: 16px;
    color: #505050;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/**
 * Year Calendar Header
 */
.year-calendar-container .year-calendar-header {
    margin-bottom: 20px;
}

.year-calendar-container .year-calendar-align-center {
    text-align: center;
}

.year-calendar-container .year-calendar-align-left {
    text-align: left;
}

.year-calendar-container .year-calendar-align-right {
    text-align: right;
}

.year-calendar-container .year-title {
    margin: 0 0 20px 0;
    /* Remove specific styling to inherit from global theme H1 */
}

/**
 * Year Calendar Grid - using CSS Grid with pure CSS responsiveness
 */
.year-calendar-container .year-calendar-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

/**
 * Month Calendar
 */
.year-calendar-container .year-calendar-month {
    border: none;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.year-calendar-container .month-header {
    background-color: var(--year-calendar-accent-color, #505050);
    padding: 8px;
    text-align: center;
    color: #fff;
}

.year-calendar-container .month-header .month-name {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--year-calendar-month-name-color, #5F5F5F);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.year-calendar-container .month-header .month-name a.month-link {
    color: var(--year-calendar-month-name-color, #5F5F5F);
    text-decoration: none;
    display: block;
    padding: 2px;
    cursor: pointer;
}

.year-calendar-container .month-header .month-name a.month-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.year-calendar-container .month-header .month-name:hover {
    opacity: 0.9;
}

.year-calendar-container .month-table {
    width: 100%;
    border-collapse: collapse;
}

.year-calendar-container .month-table th {
    padding: 8px 2px;
    text-align: center;
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.year-calendar-container .month-table td {
    width: 14.28%;
    height: 30px;
    text-align: center;
    padding: 0;
    position: relative;
    font-size: 13px;
    font-weight: 400;
}

.year-calendar-container .month-table td.empty {
    background-color: #f9f9f9;
}

.year-calendar-container .month-table td.day {
    cursor: pointer;
}

.year-calendar-container .month-table td.today {
    background-color: rgba(80, 80, 80, 0.1);
}

.year-calendar-container .month-table td.weekend {
    color: #555;
}

.year-calendar-container .month-table td.has-events {
    position: relative;
}

.year-calendar-container .month-table td.has-events:after {
    display: none;
}

.year-calendar-container .day-number {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 30px;
    font-size: 13px;
    font-weight: 400;
}

.year-calendar-container .day:hover {
    background-color: #f0f0f0;
}

/**
 * Pure CSS Responsive Layout
 * Specific layouts per requirements:
 * - Full-width pages: 4x3 grid
 * - Pages with sidebar: 3x4 grid
 * - Tablet portrait: 2x6 grid
 * - Mobile: 1x12 grid
 */

/* Default 4x3 grid for full-width pages (desktop) */
.year-calendar-container .year-calendar-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Target content with sidebar layouts - force 3x4 grid */
.content-area .year-calendar-container .year-calendar-grid,
.site-main .year-calendar-container .year-calendar-grid,
.site-content .year-calendar-container .year-calendar-grid,
.column-content .year-calendar-container .year-calendar-grid,
.main-content .year-calendar-container .year-calendar-grid,
.primary-content .year-calendar-container .year-calendar-grid,
body.has-sidebar .year-calendar-container .year-calendar-grid,
.page-template-template-with-sidebar .year-calendar-container .year-calendar-grid,
body.sidebar-content .year-calendar-container .year-calendar-grid,
body.content-sidebar .year-calendar-container .year-calendar-grid,
body.has-sidebar-right .year-calendar-container .year-calendar-grid,
body.has-sidebar-left .year-calendar-container .year-calendar-grid,
.with-sidebar .year-calendar-container .year-calendar-grid,
.content-with-sidebar .year-calendar-container .year-calendar-grid,
.col-md-8 .year-calendar-container .year-calendar-grid,
.col-md-9 .year-calendar-container .year-calendar-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Tablet portrait layout (2x6 grid) for medium screens */
@media (max-width: 768px) {
    .year-calendar-container .year-calendar-grid,
    .content-area .year-calendar-container .year-calendar-grid,
    .site-main .year-calendar-container .year-calendar-grid,
    .site-content .year-calendar-container .year-calendar-grid,
    .with-sidebar .year-calendar-container .year-calendar-grid,
    body.has-sidebar .year-calendar-container .year-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile layout (1x12 grid) for small screens */
@media (max-width: 480px) {
    .year-calendar-container .year-calendar-grid,
    .content-area .year-calendar-container .year-calendar-grid,
    .site-main .year-calendar-container .year-calendar-grid,
    .site-content .year-calendar-container .year-calendar-grid,
    .with-sidebar .year-calendar-container .year-calendar-grid,
    body.has-sidebar .year-calendar-container .year-calendar-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Support container queries for more precise control in modern browsers */
@supports (container-type: inline-size) {
    .year-calendar-container {
        container-type: inline-size;
    }
    
    /* Sidebar layout (3x4 grid) */
    @container (max-width: 900px) {
        .year-calendar-container .year-calendar-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    
    /* Tablet portrait layout (2x6 grid) */
    @container (max-width: 650px) {
        .year-calendar-container .year-calendar-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    /* Mobile layout (1x12 grid) */
    @container (max-width: 450px) {
        .year-calendar-container .year-calendar-grid {
            grid-template-columns: repeat(1, 1fr);
        }
    }
}

/* Update toolbar layout for smaller widths */
@media screen and (max-width: 699px) {
    .year-calendar-container .year-calendar-toolbar {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
    .year-calendar-container .year-calendar-navigation.year-calendar-prev {
        order: 0;
        flex: 0 0 auto;
        justify-content: flex-start;
        text-align: left;
    }
    .year-calendar-container .year-calendar-actions {
        order: 1;
        flex: 1 1 auto;
        justify-content: center;
        margin-bottom: 0;
        text-align: center;
    }
    .year-calendar-container .year-calendar-navigation.year-calendar-next {
        order: 2;
        flex: 0 0 auto;
        justify-content: flex-end;
        text-align: right;
    }
    .year-calendar-container .year-calendar-navigation .year-text {
        display: none;
    }
    .year-calendar-container .year-calendar-nav-button {
        padding: 8px;
    }
    .year-calendar-container .year-calendar-nav-button.prev-year i {
        margin-right: 0;
    }
    .year-calendar-container .year-calendar-nav-button.next-year i {
        margin-left: 0;
    }
}

@media screen and (max-width: 499px) {
    .year-calendar-container .year-calendar-month {
        margin-bottom: 20px;
    }
}

/**
 * Day Details Popup
 */
.year-calendar-day-details {
    position: fixed;
    width: 90%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    margin-top: 5px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Update selectors to work both inside and outside the container */
.year-calendar-container .day-details-header,
.year-calendar-day-details .day-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.year-calendar-container .day-title,
.year-calendar-day-details .day-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.year-calendar-container .day-close-button,
.year-calendar-day-details .day-close-button {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.5;
    line-height: 1;
}

.year-calendar-container .day-close-button:hover,
.year-calendar-day-details .day-close-button:hover {
    opacity: 0.8;
}

.year-calendar-container .day-details-content,
.year-calendar-day-details .day-details-content {
    padding: 15px 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.year-calendar-container .day-info,
.year-calendar-day-details .day-info {
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 15px;
}

.year-calendar-container .day-info p,
.year-calendar-day-details .day-info p {
    margin: 0;
    padding: 0;
}

.year-calendar-container .day-events,
.year-calendar-day-details .day-events {
    margin-bottom: 8px;
}

.year-calendar-container .day-events .event-category,
.year-calendar-day-details .day-events .event-category {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
}

.year-calendar-container .day-events ul,
.year-calendar-day-details .day-events ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style-type: disc;
}

.year-calendar-container .day-events li,
.year-calendar-day-details .day-events li {
    margin-bottom: 8px;
}

.year-calendar-container .day-details-footer,
.year-calendar-day-details .day-details-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.year-calendar-container .day-details-action,
.year-calendar-day-details .day-details-action {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    background-color: #f1f1f1;
    border: none;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
}

.year-calendar-container .day-details-action:hover,
.year-calendar-day-details .day-details-action:hover {
    background-color: #e0e0e0;
    color: #333;
}

.year-calendar-container .day-details-action.add-event,
.year-calendar-day-details .day-details-action.add-event {
    background-color: #f1f1f1;
    color: #333;
}

.year-calendar-container .day-details-action.add-event:hover,
.year-calendar-day-details .day-details-action.add-event:hover {
    background-color: #e0e0e0;
}

/**
 * Year Calendar Footer
 */
.year-calendar-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/**
 * Download Button
 */
.year-calendar-download-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--year-calendar-accent-color, #505050);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.year-calendar-download-button i {
    margin-right: 8px;
}

.year-calendar-download-button:hover {
    background-color: var(--year-calendar-accent-hover-color, #3a3a3a);
    color: #fff;
}

/**
 * Custom Button Styles
 */
/* Rounded Button Style */
.year-calendar-button-style-rounded {
    background-color: var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.year-calendar-button-style-rounded:hover {
    background-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Square Button Style */
.year-calendar-button-style-square {
    background-color: var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    color: #fff;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.year-calendar-button-style-square:hover {
    background-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Pill Button Style */
.year-calendar-button-style-pill {
    background-color: var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    color: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.year-calendar-button-style-pill:hover {
    background-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Outline Button Style */
.year-calendar-button-style-outline {
    background-color: transparent;
    color: var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    border: 2px solid var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    border-radius: 6px;
}

.year-calendar-button-style-outline:hover {
    background-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
    color: #fff;
    border-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
}

/* Outline Style Variations */
.year-calendar-button-style-outline.year-calendar-outline-style-rounded {
    border-radius: 15px;
}

.year-calendar-button-style-outline.year-calendar-outline-style-square {
    border-radius: 0;
}

.year-calendar-button-style-outline.year-calendar-outline-style-pill {
    border-radius: 50px;
}

/* No Style - Will use theme's button styles */
.year-calendar-download-button.wp-element-button,
.year-calendar-download-button.wp-block-button__link {
    /* Only add styling for icon alignment, let theme handle everything else */
    display: inline-flex;
    align-items: center;
    /* Remove our custom styles */
    background-color: initial;
    box-shadow: initial;
    border-radius: initial;
    /* Ensure the button fits content */
    width: auto !important;
    height: auto !important;
    padding: 0.5em 1em !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.year-calendar-download-button.wp-element-button i,
.year-calendar-download-button.wp-element-button .dashicons,
.year-calendar-download-button.wp-block-button__link i,
.year-calendar-download-button.wp-block-button__link .dashicons {
    margin-right: 0.5em;
}

/* Button container for alignment */
.year-calendar-button-container {
    display: block;
    margin: 1em 0;
    clear: both;
}

/* For center alignment */
.year-calendar-button-container[style*="text-align:center"] {
    text-align: center;
    display: block;
    width: 100%;
}

/* For right alignment */
.year-calendar-button-container[style*="text-align:right"] {
    text-align: right;
    display: block;
    width: 100%;
}

/* For left alignment */
.year-calendar-button-container[style*="text-align:left"] {
    text-align: left;
    display: block;
    width: 100%;
}

/* For vertical alignment */
.year-calendar-button-container[style*="vertical-align:top"] {
    vertical-align: top;
}

.year-calendar-button-container[style*="vertical-align:middle"] {
    vertical-align: middle;
}

.year-calendar-button-container[style*="vertical-align:bottom"] {
    vertical-align: bottom;
}

/* Toolbar Button Style - Like calendar navigation buttons */
.year-calendar-button-style-toolbar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    background-color: #f7f7f7 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    color: #505050 !important;
    box-shadow: none !important;
}

.year-calendar-button-style-toolbar i,
.year-calendar-button-style-toolbar .dashicons {
    margin-right: 8px !important;
    color: #505050 !important;
}

.year-calendar-button-style-toolbar:hover {
    background-color: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
    box-shadow: none !important;
}

/* 3D Button Style */
.year-calendar-button-style-3d {
    background-color: var(--year-calendar-custom-button-color, var(--year-calendar-accent-color, #505050));
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    padding: 10px 20px 8px;
}

.year-calendar-button-style-3d:hover {
    background-color: var(--year-calendar-custom-button-hover-color, var(--year-calendar-accent-hover-color, #3a3a3a));
    transform: translateY(2px);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

/* Icon styling for all button types */
.year-calendar-download-button i,
.year-calendar-download-button .dashicons {
    margin-right: 8px;
}

/**
 * Event Highlight Colors
 */
/* Remove background coloring for entire cells */
.year-calendar-container .month-table td.holiday,
.year-calendar-container .month-table td.day[data-has-holiday="true"] {
    background-color: transparent;
}

.year-calendar-container .month-table td.observance,
.year-calendar-container .month-table td.day[data-has-observance="true"] {
    background-color: transparent;
}

.year-calendar-container .month-table td.special,
.year-calendar-container .month-table td.day[data-has-special="true"] {
    background-color: transparent;
}

.year-calendar-container .month-table td.user-event,
.year-calendar-container .month-table td.day[data-has-user-event="true"] {
    background-color: transparent;
}

/* Apply circular styling to day numbers for events */
.year-calendar-container .month-table td.day[data-has-holiday="true"] .day-number {
    background-color: var(--year-calendar-holiday-color, #ffcccc);
    color: #333;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
    margin: 2px;
}

.year-calendar-container .month-table td.day[data-has-observance="true"] .day-number {
    background-color: var(--year-calendar-observance-color, #ffeb99);
    color: #333;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
    margin: 2px;
}

.year-calendar-container .month-table td.day[data-has-special="true"] .day-number {
    background-color: var(--year-calendar-special-color, #cce8ff);
    color: #333;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
    margin: 2px;
}

.year-calendar-container .month-table td.day[data-has-user-event="true"] .day-number {
    background-color: var(--year-calendar-user-event-color, #d1f8d1);
    color: #333;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
    margin: 2px;
}

/* Styling for today's date */
.year-calendar-container .month-table td.today .day-number {
    background-color: var(--year-calendar-today-color, #505050);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: inline-block;
    margin: 2px;
}

/* Holiday list styling in day details */
.year-calendar-container .day-events .holiday,
.year-calendar-container .day-holidays li.holiday,
.year-calendar-day-details .day-events .holiday,
.year-calendar-day-details .day-holidays li.holiday {
    color: #d9534f;
    font-weight: bold;
}

.year-calendar-container .day-observances li.observance,
.year-calendar-day-details .day-observances li.observance {
    color: #5cb85c;
    font-weight: bold;
}

.year-calendar-container .day-special-days li.special-day,
.year-calendar-day-details .day-special-days li.special-day {
    color: #5bc0de;
    font-weight: bold;
}

/* Holiday link styling */
.year-calendar-container .day-events .holiday a,
.year-calendar-day-details .day-events .holiday a {
    text-decoration: none;
    color: #d9534f;
    border-bottom: 1px dotted;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 16px;
}

.year-calendar-container .day-events .observance a,
.year-calendar-day-details .day-events .observance a {
    text-decoration: none;
    color: #5cb85c;
    border-bottom: 1px dotted;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 16px;
}

.year-calendar-container .day-events .special-day a,
.year-calendar-day-details .day-events .special-day a {
    text-decoration: none;
    color: #5bc0de;
    border-bottom: 1px dotted;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 16px;
}

.year-calendar-container .day-events .holiday a:hover,
.year-calendar-day-details .day-events .holiday a:hover {
    color: #d9534f;
    border-bottom: 1px solid;
    opacity: 0.9;
}

.year-calendar-container .day-events .observance a:hover,
.year-calendar-day-details .day-events .observance a:hover {
    color: #5cb85c;
    border-bottom: 1px solid;
    opacity: 0.9;
}

.year-calendar-container .day-events .special-day a:hover,
.year-calendar-day-details .day-events .special-day a:hover {
    color: #5bc0de;
    border-bottom: 1px solid;
    opacity: 0.9;
}

/* User event styling in day details */
.year-calendar-container .day-events .user-event,
.year-calendar-day-details .day-events .user-event {
    background-color: var(--year-calendar-user-event-color, #d1f8d1);
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 3px;
}

/* Custom: Popup event font sizes */
.year-calendar-day-details .day-events .holiday {
    font-size: 15px;
}
.year-calendar-day-details .day-events .observance {
    font-size: 15px;
}
.year-calendar-day-details .day-events .special,
.year-calendar-day-details .day-events .special-day {
    font-size: 15px;
}
.year-calendar-day-details .day-events .user-event {
    font-size: 15px;
}

/* Custom: No events message font size in popup */
.year-calendar-day-details .day-events p {
    font-size: 15px;
}

/* Multiple event types on same day */
.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-holiday-color, #ffcccc) 50%, var(--year-calendar-user-event-color, #d1f8d1) 50%);
}

.year-calendar-container .month-table td.day[data-has-observance="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-observance-color, #ffeb99) 50%, var(--year-calendar-user-event-color, #d1f8d1) 50%);
}

.year-calendar-container .month-table td.day[data-has-special="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-special-color, #cce8ff) 50%, var(--year-calendar-user-event-color, #d1f8d1) 50%);
}

/* Event type combinations without user events */
.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-observance="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-holiday-color, #ffcccc) 50%, var(--year-calendar-observance-color, #ffeb99) 50%);
}

.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-holiday-color, #ffcccc) 50%, var(--year-calendar-special-color, #cce8ff) 50%);
}

.year-calendar-container .month-table td.day[data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-observance-color, #ffeb99) 50%, var(--year-calendar-special-color, #cce8ff) 50%);
}

/* Three event type combinations */
.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-observance="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(120deg, var(--year-calendar-holiday-color, #ffcccc) 33.33%, var(--year-calendar-observance-color, #ffeb99) 33.33%, var(--year-calendar-user-event-color, #d1f8d1) 33.33%);
}

.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-special="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(120deg, var(--year-calendar-holiday-color, #ffcccc) 33.33%, var(--year-calendar-special-color, #cce8ff) 33.33%, var(--year-calendar-user-event-color, #d1f8d1) 33.33%);
}

.year-calendar-container .month-table td.day[data-has-observance="true"][data-has-special="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(120deg, var(--year-calendar-observance-color, #ffeb99) 33.33%, var(--year-calendar-special-color, #cce8ff) 33.33%, var(--year-calendar-user-event-color, #d1f8d1) 33.33%);
}

.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(120deg, var(--year-calendar-holiday-color, #ffcccc) 33.33%, var(--year-calendar-observance-color, #ffeb99) 33.33%, var(--year-calendar-special-color, #cce8ff) 33.33%);
}

/* Four event type combination */
.year-calendar-container .month-table td.day[data-has-holiday="true"][data-has-observance="true"][data-has-special="true"][data-has-user-event="true"] .day-number {
    background: conic-gradient(var(--year-calendar-holiday-color, #ffcccc) 0deg 90deg, var(--year-calendar-observance-color, #ffeb99) 90deg 180deg, var(--year-calendar-special-color, #cce8ff) 180deg 270deg, var(--year-calendar-user-event-color, #d1f8d1) 270deg 360deg);
}

/* Today + Event combinations - Today color takes precedence with event indicator */
/* Today + Holiday */
.year-calendar-container .month-table td.today[data-has-holiday="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + Observance */
.year-calendar-container .month-table td.today[data-has-observance="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-observance="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-observance-color, #ffeb99) 30%);
    color: #fff;
}

/* Today + Special Day */
.year-calendar-container .month-table td.today[data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-special-color, #cce8ff) 30%);
    color: #fff;
}

/* Today + User Event */
.year-calendar-container .month-table td.today[data-has-user-event="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-user-event="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-user-event-color, #d1f8d1) 30%);
    color: #fff;
}

/* Multiple events with Today - Priority: Holiday > User Event > Observance > Special Day */
/* Today + Holiday + User Event (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + Holiday + Observance (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-observance="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-observance="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + Holiday + Special Day (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + User Event + Observance (User Event takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-observance="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-observance="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-user-event-color, #d1f8d1) 30%);
    color: #fff;
}

/* Today + User Event + Special Day (User Event takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-user-event-color, #d1f8d1) 30%);
    color: #fff;
}

/* Today + Observance + Special Day (Observance takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-observance="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-observance-color, #ffeb99) 30%);
    color: #fff;
}

/* Today + Holiday + User Event + Observance (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-observance="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-observance="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + Holiday + User Event + Special Day (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + Holiday + Observance + Special Day (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-observance="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Today + User Event + Observance + Special Day (User Event takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-observance="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-user-event="true"][data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-user-event-color, #d1f8d1) 30%);
    color: #fff;
}

/* Today + All Event Types (Holiday takes priority for 30%) */
.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-observance="true"][data-has-special="true"] {
    background-color: rgba(80, 80, 80, 0.1) !important;
}

.year-calendar-container .month-table td.today[data-has-holiday="true"][data-has-user-event="true"][data-has-observance="true"][data-has-special="true"] .day-number {
    background: linear-gradient(135deg, var(--year-calendar-today-color, #505050) 70%, var(--year-calendar-holiday-color, #ffcccc) 30%);
    color: #fff;
}

/* Add styles for days with events */
.year-calendar-container .day.has-user-event {
    position: relative;
    z-index: 1;
}

.year-calendar-container .day.has-user-event > span {
    background-color: var(--year-calendar-user-event-color, #d1f8d1);
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

/* Ensure numbered events display properly in popup */
.year-calendar-container .year-calendar-day-details .user-event.printable-calendar-content,
.year-calendar-day-details .user-event.printable-calendar-content {
    background-color: #fffde7;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: pre-line;
    border: 1px solid rgba(0,0,0,0.05);
}

/* User event styling with edit button */
.year-calendar-container .user-event.printable-calendar-content,
.year-calendar-day-details .user-event.printable-calendar-content {
    position: relative;
    padding-right: 30px;
}

.year-calendar-container .edit-event-button,
.year-calendar-day-details .edit-event-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.year-calendar-container .edit-event-button:hover,
.year-calendar-day-details .edit-event-button:hover {
    color: #333;
}

.year-calendar-container .edit-event-button .dashicons,
.year-calendar-day-details .edit-event-button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/**
 * Event Indicators
 */
.year-calendar-container .event-indicators {
    display: none;
}

.year-calendar-container .event-dot {
    display: none;
}

.year-calendar-container .holiday-dot {
    display: none;
}

.year-calendar-container .observance-dot {
    display: none;
}

.year-calendar-container .special-dot {
    display: none;
}

.year-calendar-container .user-event-dot {
    display: none;
}

.year-calendar-container .user-events .user-event,
.year-calendar-day-details .user-events .user-event {
    background-color: #fffde7;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: pre-line;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.year-calendar-container .event-title,
.year-calendar-day-details .event-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.year-calendar-container .day-events .holiday a:after,
.year-calendar-container .day-events .observance a:after,
.year-calendar-container .day-events .special-day a:after,
.year-calendar-day-details .day-events .holiday a:after,
.year-calendar-day-details .day-events .observance a:after,
.year-calendar-day-details .day-events .special-day a:after {
    content: '\2197'; /* Unicode for northeast arrow */
    position: absolute;
    font-size: 12px;
    right: 0;
    top: 0;
}

/* Share Dropdown Styles - New addition */
.year-calendar-container .year-calendar-share-dropdown {
    position: relative;
    display: inline-block;
}

.year-calendar-container .year-calendar-share-content {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px; /* Reduced width */
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 0; /* Reduced padding */
    z-index: 100;
    margin-top: 5px;
    border: 1px solid #ddd;
}

.year-calendar-container .year-calendar-share-content:before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    margin-left: -8px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
    z-index: 1;
}

.year-calendar-container .year-calendar-share-content:after {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    margin-left: -9px;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #ddd;
    z-index: 0;
}

.year-calendar-container .year-calendar-share-content a {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    transition: background-color 0.2s ease;
    line-height: 1.5;
}

.year-calendar-container .year-calendar-share-content a:hover {
    background-color: #f5f5f5;
    color: #333;
}

.year-calendar-container .year-calendar-share-content a span,
.year-calendar-container .year-calendar-share-content a .whatsapp-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    text-align: center;
    flex-shrink: 0;
}

.year-calendar-container .year-calendar-share-content a .whatsapp-svg-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Highlighted URL styling */
.highlighted-url {
    background-color: #f7f7f7;
    border-left: 4px solid #2271b1;
}

.highlighted-url td {
    padding: 15px 10px;
}

.url-explanation {
    margin-top: 5px;
    color: #666;
} 

/**
 * Holiday List Styles
 */
.year-calendar-holidays-container {
    margin-bottom: 20px;
    width: 100%;
    font-family: inherit;
}

.year-calendar-holidays-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 14px;
}

.year-calendar-holidays-table thead th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.year-calendar-holidays-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.year-calendar-holidays-table tbody tr.even {
    background-color: #f5f5f5;
}

.year-calendar-holidays-table tbody tr:hover {
    background-color: #f0f0f0;
}

.year-calendar-holidays-table a {
    color: #0073aa;
    text-decoration: none;
}

.year-calendar-holidays-table a:hover {
    color: #00a0d2;
    text-decoration: underline;
}

.year-calendar-holidays-no-results {
    padding: 20px;
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Responsive styles */
@media screen and (max-width: 600px) {
    .year-calendar-holidays-table {
        font-size: 12px;
    }
    
    .year-calendar-holidays-table thead th,
    .year-calendar-holidays-table tbody td {
        padding: 6px 8px;
    }
} 