/**
 * EDC Advance Calendar Styles
 * Matching the exact UI from the screenshot
 * 
 * @package EDC_Advance_Calendar
 */

/* Reset and Base Styles - Important to override theme styles */
.edc-calendar-wrapper {
    max-width: 100% !important;
    margin: 0 auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background: #ffffff !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.edc-calendar-wrapper * {
    box-sizing: border-box;
}

/* Main Header (Like Original Site) */
.edc-calendar-main-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.edc-calendar-main-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.edc-calendar-view-button {
    display: inline-block;
    padding: 12px 30px;
    background: #007476 !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.edc-calendar-view-button:hover {
    background: #005d5f !important;
    color: #ffffff !important;
    text-decoration: none;
}

/* Calendar Header */
.edc-calendar-header {
    margin-bottom: 20px;
    overflow: visible;
    visibility: visible;
}

.edc-calendar-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    overflow: visible;
    visibility: visible;
}

.edc-calendar-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #333;
    text-align: center;
    flex: 1;
}

.edc-nav-link {
    font-size: 16px;
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    transition: color 0.3s ease;
    font-weight: 500;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

.edc-nav-link:hover {
    color: #333;
}

.edc-nav-prev {
    text-align: left;
}

.edc-nav-next {
    text-align: right;
}

/* Calendar Tabs */
.edc-calendar-tabs {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e0e0e0;
    gap: 0;
    position: relative;
}

.edc-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.edc-tab:hover:not(:disabled) {
    color: #333;
    background: #f5f5f5;
}

.edc-tab:focus {
    outline: 2px solid #007476;
    outline-offset: 2px;
}

.edc-tab.active {
    color: #333;
    border-bottom-color: #007476;
    font-weight: 600;
}

.edc-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.edc-search-icon {
    margin-left: auto;
    padding: 12px 20px;
    color: #666;
    cursor: pointer;
}

.edc-search-icon:hover {
    color: #333;
}

.edc-search-box {
    display: none;
    align-items: center;
    margin-left: 10px;
}

.edc-search-box.active {
    display: flex;
}

.edc-search-box .edc-search-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 220px;
}

/* Calendar Grid */
.edc-calendar-grid {
    margin: 20px 0;
    overflow-x: auto;
}

.edc-calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
}

.edc-calendar-table thead th {
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edc-calendar-table thead th:last-child {
    border-right: none;
}

/* Day Cells */
.edc-day-cell {
    vertical-align: top;
    padding: 8px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    height: 140px;
    min-height: 140px;
    position: relative;
    background: #fff;
    transition: background-color 0.2s ease;
}

.edc-day-cell:last-child {
    border-right: none;
}

.edc-calendar-table tbody tr:last-child .edc-day-cell {
    border-bottom: none;
}

.edc-empty-day {
    background: #fafafa;
}

.edc-day-cell.edc-today,
.edc-calendar-wrapper .edc-day-cell.edc-today {
    /* Force today cell to look like a normal day (no yellow) */
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    filter: none !important;
    outline: none !important;
}

.edc-day-cell:hover:not(.edc-empty-day) {
    background: #f9f9f9;
}

.edc-day-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    padding: 2px 0;
}

.edc-empty-day .edc-day-number {
    color: #ccc;
}

/* Event Blocks - Important to override theme styles */
.edc-day-events {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-top: 6px !important;
}

.edc-event-block {
    display: block !important;
    padding: 6px 8px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 4px !important;
    font-weight: 500 !important;
    /* No default background - category classes will set the color */
}

/* NO DEFAULT COLORS - Events without category color are not rendered */

.edc-event-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    opacity: 0.9;
}

.edc-event-title {
    display: block !important;
    font-weight: 500 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    white-space: normal !important;
}

/* Category Colors - Updated Color Codes - Maximum specificity to override theme */
.edc-calendar-wrapper .edc-event-block.edc-cat-edc,
.edc-calendar-wrapper a.edc-event-block.edc-cat-edc,
.edc-calendar-wrapper .edc-cat-edc.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-edc {
    background-color: #b2c0c6 !important; /* EDC - Light blue-gray */
    color: #1a1a1a !important;
    border: none !important;
}

.edc-calendar-wrapper .edc-event-block.edc-cat-score,
.edc-calendar-wrapper a.edc-event-block.edc-cat-score,
.edc-calendar-wrapper .edc-cat-score.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-score {
    background-color: #b6d6c1 !important; /* SCORE - Light green */
    color: #1a1a1a !important;
    border: none !important;
}

.edc-calendar-wrapper .edc-event-block.edc-cat-wev,
.edc-calendar-wrapper a.edc-event-block.edc-cat-wev,
.edc-calendar-wrapper .edc-cat-wev.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-wev {
    background-color: #eebfbf !important; /* WEV - Light pink */
    color: #1a1a1a !important;
    border: none !important;
}

.edc-calendar-wrapper .edc-event-block.edc-cat-sba,
.edc-calendar-wrapper a.edc-event-block.edc-cat-sba,
.edc-calendar-wrapper .edc-cat-sba.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-sba {
    background-color: #fff5cd !important; /* SBA - Light yellow */
    color: #1a1a1a !important;
    border: none !important;
}

.edc-calendar-wrapper .edc-event-block.edc-cat-cmtc,
.edc-calendar-wrapper a.edc-event-block.edc-cat-cmtc,
.edc-calendar-wrapper .edc-cat-cmtc.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-cmtc {
    background-color: #c9c2a9 !important; /* CMTC - Beige/tan */
    color: #1a1a1a !important;
    border: none !important;
}

.edc-calendar-wrapper .edc-event-block.edc-cat-other,
.edc-calendar-wrapper a.edc-event-block.edc-cat-other,
.edc-calendar-wrapper .edc-cat-other.edc-event-block,
.edc-day-events .edc-event-block.edc-cat-other {
    background-color: #f4d0bb !important; /* OTHER - Light peach */
    color: #1a1a1a !important;
    border: none !important;
}

/* Category Legend */
.edc-calendar-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.edc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edc-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* Legend colors come from term meta - no hardcoded colors */

.edc-legend-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Events List Below Calendar (Like Original Site) */
.edc-events-list-below-calendar {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

/* List tab: hide the extra top border line under tabs */
.edc-list-view .edc-events-list-below-calendar {
    border-top: 0 !important;
}

.edc-events-list-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.edc-event-list-item-below {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Remove border-left colors for list items - match original site */

.edc-event-list-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.edc-event-list-main {
    flex: 1;
}

.edc-event-list-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.edc-event-list-title a {
    color: #333;
    text-decoration: none;
}

.edc-event-list-title a:hover {
    color: #007476 !important;
    text-decoration: underline;
}

.edc-event-list-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.edc-event-list-meta {
    flex: 0 0 300px;
    text-align: right;
}

.edc-event-list-date-time {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.edc-event-list-date-time span {
    display: block;
    margin-bottom: 5px;
}

.edc-event-list-date-time i {
    margin-right: 8px;
    color: #999;
}

.edc-register-button {
    display: inline-block;
    padding: 10px 20px;
    background: #007476 !important;
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.edc-register-button:hover {
    background: #005d5f !important;
    color: white !important;
    text-decoration: none;
}

/* Week / Day view layouts */
.edc-week-view .edc-week-block,
.edc-day-view .edc-day-block {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
    background: #ffffff;
}

.edc-week-block-header,
.edc-day-block-header {
    margin-bottom: 12px;
}

.edc-week-title,
.edc-day-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.edc-week-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.edc-week-day {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
}

.edc-week-day.edc-outside-month {
    opacity: 0.75;
}

.edc-week-day-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    gap: 2px;
}

.edc-week-day-name {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.edc-week-day-date {
    font-size: 14px;
}

.edc-no-events-day {
    padding: 8px 0;
    color: #777;
    font-style: italic;
}

.edc-day-events,
.edc-week-day-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edc-day-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Events List Styling (Matching Original Site) */
.edc-events-list-below-calendar .upcoming {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
}

.edc-events-list-below-calendar .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    align-items: flex-start;
}

.edc-events-list-below-calendar .col-sm-8,
.edc-events-list-below-calendar .col-sm-4 {
    padding: 0 15px;
    box-sizing: border-box;
}

.edc-events-list-below-calendar .col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.edc-events-list-below-calendar .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.edc-events-list-below-calendar .event-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #007476 !important;
}

.edc-events-list-below-calendar .event-title a {
    color: #007476 !important;
    text-decoration: none;
}

.edc-events-list-below-calendar .event-title a:hover {
    color: #005d5f !important;
    text-decoration: underline;
}

.edc-events-list-below-calendar .event-content {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.edc-events-list-below-calendar .event-date {
    margin: 0;
    font-size: 14px;
    color: #555;
    text-align: right;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.edc-events-list-below-calendar .event-date span {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1.6;
}

.edc-events-list-below-calendar .event-date span:last-child {
    margin-right: 0;
}

.edc-events-list-below-calendar .event-date i {
    margin-right: 8px;
    color: #666;
    width: 16px;
    text-align: center;
}

.edc-events-list-below-calendar .cta-register {
    margin: 0 0 16px 0;
    text-align: center;
    width: 100%;
}

.edc-events-list-below-calendar .cta-register a {
    display: inline-block !important;
    padding: 10px 24px !important;
    background-color: #0e3b4e !important;
    border: 1px solid #0e3b4e !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 14px;
    letter-spacing: 0.25px;
    transition: background 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-shadow: none !important;
}

.edc-events-list-below-calendar .cta-register a:hover {
    background: #ffffff !important;
    border-color: #0e3b4e !important;
    color: #0e3b4e !important;
    text-decoration: none;
}

.edc-events-list-below-calendar .edc-event-meta-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 12px !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.edc-events-list-below-calendar .edc-event-meta-inline span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.edc-events-list-below-calendar .edc-event-meta-inline i {
    color: #666;
    width: 16px;
    text-align: center;
}

/* Strip all backgrounds/padding/borders from inline meta and children */
.edc-event-meta-inline,
.edc-event-meta-inline * {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure date/time on one line with gap for all views */
.edc-list-card-right .edc-event-meta-inline,
.edc-week-event-right .edc-event-meta-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

/* Center the button below date/time for all views */
.edc-list-card-right .cta-register,
.edc-week-event-right .cta-register {
    text-align: center !important;
    width: 100%;
    margin: 0 !important;
}

/* Button styling for list, week, and day views */
.edc-list-card-right .cta-register a,
.edc-week-event-right .cta-register a {
    background-color: #0e3b4e !important;
    border: 1px solid #0e3b4e !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-size: 14px;
    letter-spacing: 0.25px;
}

.edc-list-card-right .cta-register a:hover,
.edc-week-event-right .cta-register a:hover {
    background-color: #ffffff !important;
    border-color: #0e3b4e !important;
    color: #0e3b4e !important;
}

/* Responsive refinements for all views */
@media (max-width: 992px) {
    .edc-calendar-wrapper {
        padding: 16px !important;
    }
    .edc-calendar-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    .edc-calendar-title-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .edc-calendar-title {
        text-align: left;
        width: 100%;
    }
    .edc-search-box.active {
        width: 100%;
    }
    .edc-search-box .edc-search-input {
        width: 100%;
    }
    .edc-list-card-row {
        flex-direction: column;
        gap: 12px;
    }
    .edc-list-card-right {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    .edc-event-meta-inline {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    .edc-calendar-table {
        min-width: 640px;
    }
}

@media (max-width: 640px) {
    .edc-calendar-wrapper {
        padding: 12px !important;
    }
    .edc-tab {
        padding: 10px 14px;
        font-size: 15px;
    }
    .edc-day-cell {
        min-height: 120px;
        padding: 6px;
    }
    .edc-event-block {
        font-size: 11px !important;
    }
    .edc-list-title a {
        font-size: 18px;
    }
    .edc-list-excerpt {
        font-size: 14px;
    }
    .edc-week-days {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .edc-week-day,
    .edc-week-view .edc-week-block,
    .edc-day-view .edc-day-block {
        padding: 12px;
    }
}

.edc-event-date,
.edc-event-time {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Hard override any other date wrappers that might add backgrounds/padding */
.edc-event-date *,
.edc-event-time * {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .edc-events-list-below-calendar .col-sm-8,
    .edc-events-list-below-calendar .col-sm-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .edc-events-list-below-calendar .col-sm-4 {
        text-align: left;
        margin-top: 15px;
    }
    
    .edc-event-list-content {
        flex-direction: column;
    }
    
    .edc-event-list-meta {
        flex: 1;
        text-align: left;
    }
}

/* List View Styles */
.edc-list-view .edc-event-list {
    margin: 30px 0;
}

.edc-list-card {
    padding: 28px 0;
    border-top: 1px solid #dcdcdc;
    border-bottom: 1px solid #dcdcdc;
}

.edc-list-card:first-child {
    border-top: none !important;
}

.edc-list-card + .edc-list-card {
    margin-top: -1px;
}

.edc-list-card-row {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.edc-list-card-left {
    flex: 1 1 65%;
}

.edc-list-card-right {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.edc-list-title {
    margin: 0 0 14px 0;
    font-size: 24px;
    font-weight: 600;
    color: #007476;
    line-height: 1.3;
}

.edc-list-title a {
    color: #007476;
    text-decoration: none;
}

.edc-list-title a:hover {
    color: #005d5f;
    text-decoration: underline;
}

.edc-list-excerpt {
    margin: 0 0 16px 0;
    color: #444;
    line-height: 1.7;
    font-size: 16px;
}

.edc-list-read-more {
    display: inline-block;
    margin-top: 6px;
    font-weight: 700;
    color: #007476;
    text-decoration: none;
    letter-spacing: 0.25px;
}

.edc-list-read-more:hover {
    color: #005d5f;
    text-decoration: underline;
}

.edc-list-button {
    display: inline-block;
    padding: 12px 24px;
    background: #007476 !important;
    border: 1px solid #007476 !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.25px;
    transition: background 0.3s ease, border-color 0.3s ease;
    text-align: center;
    min-width: 180px;
}

.edc-list-button:hover {
    background: #005d5f !important;
    border-color: #005d5f !important;
    color: #ffffff !important;
}

.edc-list-datetime {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.edc-list-datetime span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edc-list-datetime i {
    color: #666;
    width: 16px;
    text-align: center;
}

.edc-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.edc-no-events p {
    font-size: 18px;
    margin: 0;
}

/* Week View Styles */
.edc-week-list {
    margin: 30px 0;
}

.edc-week-section {
    margin-bottom: 50px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.edc-week-section:last-child {
    margin-bottom: 0;
}

.edc-week-section-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.edc-week-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #007476;
    margin: 0;
    line-height: 1.2;
}

.edc-week-section-date-range {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.edc-week-events-grid {
    padding: 0;
}

.edc-week-event-card {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.edc-week-event-card:last-child {
    border-bottom: none;
}

.edc-week-event-card:hover {
    background-color: #f8f9fa;
}

.edc-week-event-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.edc-week-event-left {
    flex: 1;
    min-width: 0;
}

.edc-week-event-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.edc-week-event-title a {
    color: #007476;
    text-decoration: none;
    transition: color 0.2s ease;
}

.edc-week-event-title a:hover {
    color: #005d5f;
    text-decoration: underline;
}

.edc-week-event-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
    font-size: 15px;
}

.edc-week-event-read-more {
    color: #007476;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.edc-week-event-read-more:hover {
    color: #005d5f;
    text-decoration: underline;
}

.edc-week-event-right {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.edc-week-no-events {
    padding: 40px 30px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.edc-week-no-events p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .edc-calendar-table {
        font-size: 14px;
    }
    
    .edc-day-cell {
        height: 120px;
        min-height: 120px;
    }
    
    .edc-event-block {
        font-size: 11px;
        padding: 5px 6px;
    }
}

@media screen and (max-width: 768px) {
    .edc-calendar-wrapper {
        padding: 10px;
    }
    
    .edc-calendar-title {
        font-size: 22px;
    }
    
    .edc-nav-link {
        font-size: 14px;
        padding: 6px 10px;
        display: inline-block;
        visibility: visible;
        opacity: 1;
    }
    
    .edc-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .edc-calendar-table {
        font-size: 12px;
    }
    
    .edc-day-cell {
        height: 100px;
        min-height: 100px;
        padding: 6px;
    }
    
    .edc-event-block {
        font-size: 10px;
        padding: 4px 5px;
    }
    
    .edc-event-title {
        -webkit-line-clamp: 1;
    }
    
    .edc-calendar-legend {
        gap: 15px;
    }
    
    .edc-legend-label {
        font-size: 12px;
    }
    
    .edc-event-list-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .edc-event-date {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .edc-event-day {
        font-size: 24px;
    }
    
    /* Week View Responsive */
    .edc-week-section-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .edc-week-section-title {
        font-size: 20px;
    }
    
    .edc-week-section-date-range {
        font-size: 13px;
    }
    
    .edc-week-event-card {
        padding: 20px;
    }
    
    .edc-week-event-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .edc-week-event-right {
        flex: 1;
        width: 100%;
        align-items: center;
    }
    
    .edc-week-event-title {
        font-size: 18px;
    }
    
    .edc-week-event-excerpt {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .edc-calendar-title-row {
        flex-direction: row;
        gap: 4px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .edc-calendar-title {
        font-size: 14px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }
    
    .edc-nav-link {
        font-size: 11px;
        padding: 4px 5px;
        flex-shrink: 0;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        min-width: auto;
        display: inline-block;
        visibility: visible;
        opacity: 1;
    }
    
    .edc-calendar-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .edc-tab {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .edc-day-cell {
        height: 80px;
        min-height: 80px;
        padding: 4px;
    }
    
    .edc-day-number {
        font-size: 12px;
    }
    
    .edc-event-block {
        font-size: 9px;
        padding: 3px 4px;
    }
}

/* Accessibility Improvements */
.edc-calendar-wrapper a:focus,
.edc-calendar-wrapper button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.edc-tab:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
}

/* Print Styles */
@media print {
    .edc-calendar-tabs,
    .edc-search-icon,
    .edc-nav-link {
        display: none;
    }
    
    .edc-calendar-table {
        border: 1px solid #000;
    }
    
    .edc-day-cell {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .edc-event-block {
        border: 1px solid #000;
        color: #000 !important;
        background: #fff !important;
    }
}

/* Loading State */
.edc-calendar-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.edc-event-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.edc-event-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.edc-event-modal {
    background: #ffffff;
    border-radius: 10px;
    max-width: 700px;
    width: min(90%, 700px);
    padding: 0 40px 40px 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    overflow-x: hidden;
    outline: none;
    max-height: 90vh;
    -webkit-overflow-scrolling: touch;
}

.edc-event-modal-header {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    padding: 20px 40px;
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.edc-event-modal-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.edc-event-modal-close {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    left: auto !important;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1.2;
    color: #333;
    cursor: pointer !important;
    padding: 8px;
    margin: 0 !important;
    z-index: 10002 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    min-width: 44px;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edc-event-modal-title {
    font-size: 34px;
    font-weight: 700;
    margin: 0 auto 18px auto;
    color: #1a1a1a;
    text-align: center;
    padding: 0;
    padding-right: 0;
}

.edc-event-modal-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 auto 18px auto;
    font-size: 16px;
    color: #555;
    text-align: center;
    max-width: 100%;
}

.edc-event-modal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.edc-event-modal-icon {
    font-size: 18px;
}

.edc-event-modal-url {
    display: block;
    font-size: 16px;
    margin: 0 auto 24px auto;
    color: #007476;
    text-decoration: none;
    word-break: break-all;
    text-align: center;
    font-weight: 600;
}

.edc-event-modal-url:hover {
    text-decoration: underline;
}

.edc-event-modal-description {
    line-height: 1.6;
    color: #333;
    font-size: 14px;
    text-align: left;
    overflow-y: auto;
    max-height: 50vh;
    padding-right: 8px;
}

.edc-event-modal-description p {
    margin-top: 0;
}

.edc-event-modal-overlay .edc-event-modal-meta span:first-child .edc-event-modal-date-text,
.edc-event-modal-overlay .edc-event-modal-meta span:last-child .edc-event-modal-time-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.edc-event-modal-overlay .edc-event-modal-time-text:empty {
    display: none;
}

.edc-event-modal-overlay .edc-event-modal-date-text:empty {
    display: none;
}

.edc-event-modal-overlay .edc-event-modal-url:empty {
    display: none;
}

.edc-event-modal-inner {
    position: static;
}

/* Scroll fade indicator - shows when more content exists below */
.edc-event-modal-inner {
    position: static;
}

.edc-event-modal-description {
    position: static;
}

.edc-event-modal-description::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    display: block;
}

.edc-event-modal.has-more-content .edc-event-modal-description::after {
    opacity: 1;
}

.edc-event-modal.scrolled-to-bottom .edc-event-modal-description::after {
    opacity: 0;
}

/* Mobile scroll fade indicator - enhanced visibility */
@media screen and (max-width: 768px) {
    .edc-event-modal-description::after {
        height: 80px;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 100%);
    }
}

/* =========================================
   Event Modal Scroll + Fade (CSS ONLY)
   ========================================= */

/* Make modal body scrollable */
.edc-event-modal-inner {
    position: static;
    max-height: 65vh; /* critical: creates scroll */
    overflow-y: auto;
    padding-bottom: 24px;
}


/* ================================
   FIX: Scroll + Fade for Description
   ================================ */

/* Keep modal layout intact - modal does NOT scroll, only inner content scrolls */
.edc-event-modal {
    overflow: hidden;
}

/* Make ONLY content scroll */
.edc-event-modal-inner {
    position: static;
    max-height: 65vh;
    overflow-y: auto;
    padding-bottom: 40px;
}


/* =========================================
   Bottom Blur + Fade for Event Modal Content
   (CSS ONLY – SAFE)
   ========================================= */

/* Ensure content scrolls, not the whole modal */
.edc-event-modal-inner {
    position: relative;
    max-height: 65vh;
    overflow-y: auto;
    padding-bottom: 48px;
}


/* =========================================
   Visible Blur + Fade for Event Modal
   CSS ONLY — Additive & Safe
   ========================================= */

.edc-event-modal-inner {
    position: relative;
    max-height: 65vh;
    overflow-y: auto;
    padding-bottom: 56px;
}


/* =========================================
   Event Modal Description Scroll + Blur
   CSS ONLY — Strict & Safe
   ========================================= */

/* Make modal content scrollable */
.edc-event-modal-inner {
    position: relative;
    max-height: 60vh; /* forces scroll */
    overflow-y: auto;
    padding-bottom: 64px;

    /* Hide scrollbar (but keep scroll) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
}

.edc-event-modal-inner::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Bottom blur + fade indicator - FIXED at bottom of modal, does NOT scroll with content */
.edc-event-modal::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    pointer-events: none;

    /* Fade */
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.9)
    );

    /* Light blur effect */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    z-index: 10;
    border-radius: 0 0 10px 10px;
}

/* Remove blur when user reaches bottom */
.edc-event-modal.scrolled-to-bottom::after {
    display: none;
}

/* =========================================
   Fix: Full Event Description Rendering
   ========================================= */

/* Allow description to grow to full content height */
.edc-event-modal-description {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* Override mobile restrictions to allow full content */
@media screen and (max-width: 767px) {
    .edc-event-modal-description {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
    }
}

@media screen and (max-width: 480px) {
    .edc-event-modal-description {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
    }
}

#ios-override,
.edc-event-modal-overlay {
    -webkit-overflow-scrolling: touch;
}

.edc-event-modal-meta .edc-event-modal-time-text {
    display: inline-flex;
    color: #2b2b2b;
    font-weight: 600;
}

.edc-event-modal-meta .edc-event-modal-date-text {
    color: #444;
    font-weight: 600;
}

/* Consolidated Event Modal Responsive Styles */

.edc-calendar-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   ============================================ */

/* Large Tablets and Small Desktops (1024px - 1200px) */
@media screen and (max-width: 1200px) and (min-width: 1024px) {
    .edc-calendar-wrapper {
        padding: 18px !important;
    }
    
    .edc-calendar-title {
        font-size: 26px;
    }
    
    .edc-event-modal {
        max-width: 650px;
        padding: 0 36px 36px 36px;
    }
    
    .edc-event-modal-title {
        font-size: 32px;
    }
}

/* Tablets (768px - 1023px) */
@media screen and (max-width: 1023px) and (min-width: 768px) {
    .edc-calendar-wrapper {
        padding: 16px !important;
    }
    
    .edc-calendar-main-title {
        font-size: 28px;
    }
    
    .edc-calendar-title {
        font-size: 24px;
    }
    
    .edc-calendar-title-row {
        flex-direction: row;
        align-items: center;
    }
    
    .edc-nav-link {
        font-size: 15px;
        padding: 7px 12px;
    }
    
    .edc-tab {
        padding: 11px 20px;
        font-size: 15px;
    }
    
    .edc-calendar-table {
        font-size: 13px;
    }
    
    .edc-day-cell {
        height: 130px;
        min-height: 130px;
        padding: 7px;
    }
    
    .edc-event-block {
        font-size: 11px !important;
        padding: 5px 7px !important;
    }
    
    /* Event Modal - Tablet */
    .edc-event-modal {
        max-height: 90vh;
        overflow: hidden;
        width: min(90%, 640px);
        padding: 0 32px 32px 32px;
        position: relative !important;
    }
    
    .edc-event-modal-overlay.is-visible {
        padding: 0px !important;
    }
    
    .edc-event-modal-header {
        margin-bottom: 18px !important;
    }
    
    .edc-event-modal-title {
        font-size: 22px;
        text-shadow: 1px 0 0 currentColor;
    }
    
    .edc-event-modal:after {
        background: linear-gradient(180deg, #ffffffba, #dddddd);
        content: "";
        height: 141px;
        position: absolute !important;
        bottom: -14px;
        left: 0;
        filter: blur(11px);
        width: 100%;
    }
    
    .edc-event-modal-close {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        font-size: 24px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .edc-event-modal-description {
        font-size: 15px;
    }
    
    .edc-event-modal-meta {
        font-size: 15px;
    }
    
    /* List View - Tablet */
    .edc-list-card-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .edc-list-card-right {
        width: 100%;
        align-items: center;
    }
    
    .edc-list-title {
        font-size: 22px;
    }
    
    .edc-list-excerpt {
        font-size: 15px;
    }
    
    /* Week View - Tablet */
    .edc-week-event-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .edc-week-event-right {
        width: 100%;
        align-items: center;
    }
    
    .edc-week-event-title {
        font-size: 19px;
    }
    
    .edc-week-event-excerpt {
        font-size: 15px;
    }
    
    .edc-calendar-legend {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

/* Mobile Devices (481px - 767px) */
@media screen and (max-width: 767px) {
    .edc-calendar-wrapper {
        padding: 12px !important;
    }
    
    .edc-calendar-main-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .edc-calendar-main-title {
        font-size: 24px;
    }
    
    .edc-calendar-view-button {
        padding: 10px 24px;
        font-size: 13px;
    }
    
    .edc-calendar-title-row {
        flex-direction: row;
        gap: 4px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .edc-calendar-title {
        font-size: 16px;
        text-align: center;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .edc-nav-link {
        font-size: 12px;
        padding: 4px 6px;
        flex-shrink: 0;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        min-width: auto;
        display: inline-block;
        visibility: visible;
        opacity: 1;
    }
    
    .edc-calendar-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    
    .edc-tab {
        padding: 10px 14px;
        font-size: 14px;
        white-space: nowrap;
        min-width: auto;
    }
    
    .edc-search-icon {
        padding: 10px 16px;
    }
    
    .edc-search-box.active {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .edc-search-box .edc-search-input {
        width: 100%;
        min-width: 100%;
    }
    
    .edc-calendar-grid {
        margin: 15px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .edc-calendar-table {
        font-size: 12px;
        min-width: 640px;
    }
    
    .edc-calendar-table thead th {
        font-size: 12px;
        padding: 10px 6px;
    }
    
    .edc-day-cell {
        height: 100px;
        min-height: 100px;
        padding: 6px;
    }
    
    .edc-day-number {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .edc-event-block {
        font-size: 10px !important;
        padding: 4px 5px !important;
        line-height: 1.2 !important;
    }
    
    .edc-event-title {
        -webkit-line-clamp: 1 !important;
    }
    
    .edc-calendar-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px 0;
    }
    
    .edc-legend-item {
        width: auto;
    }
    
    .edc-legend-label {
        font-size: 12px;
    }
    
    /* Event Modal - Mobile - Popup Style (Not Full Screen) */
    .edc-event-modal-overlay {
        padding: 20px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .edc-event-modal-overlay.is-visible {
        padding: 20px !important;
    }
    
    .edc-event-modal {
        width: 90% !important;
        max-width: 500px !important;
        max-height: 85vh !important;
        padding: 0 20px 20px 20px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 auto !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4) !important;
    }
    
    .edc-event-modal-inner {
        padding: 0;
        margin: 0;
    }
    
    .edc-event-modal:after {
        display: none;
    }
    
    .edc-event-modal-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
        text-shadow: 1px 0 0 currentColor;
        padding-right: 0 !important;
        padding-left: 0 !important;
        margin-bottom: 12px !important;
        margin-top: 0 !important;
        text-align: center !important;
    }
    
    .edc-event-modal-header {
        position: relative !important;
        padding: 16px 20px !important;
        min-height: 50px !important;
        margin-bottom: 16px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .edc-event-modal-close {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        left: auto !important;
        font-size: 24px !important;
        line-height: 1 !important;
        padding: 8px !important;
        z-index: 10003 !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        color: #333 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .edc-event-modal-header-title {
        font-size: 16px !important;
        margin: 0 !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .edc-event-modal-close:hover,
    .edc-event-modal-close:active,
    .edc-event-modal-close:focus {
        color: #000 !important;
        opacity: 0.8;
    }
    
    .edc-event-modal-meta {
        font-size: 14px !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        line-height: 1.4 !important;
    }
    
    .edc-event-modal-url {
        font-size: 14px !important;
        word-break: break-word !important;
        margin-bottom: 16px !important;
        line-height: 1.4 !important;
    }
    
    .edc-event-modal-description {
        font-size: 13px !important;
        line-height: 1.5 !important;
        overflow-y: auto !important;
        max-height: 40vh !important;
        margin: 0 !important;
        padding: 0 8px 0 0 !important;
    }
    
    .edc-event-modal-header-title {
        font-size: 14px !important;
    }
    
    /* List View - Mobile */
    .edc-list-card {
        padding: 20px 0;
    }
    
    .edc-list-card-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .edc-list-card-left {
        flex: 1 1 100%;
    }
    
    .edc-list-card-right {
        flex: 1 1 100%;
        width: 100%;
        align-items: center;
    }
    
    .edc-list-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .edc-list-excerpt {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .edc-list-button {
        min-width: 100%;
        padding: 12px 20px;
    }
    
    .edc-list-datetime {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Week View - Mobile */
    .edc-week-section-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .edc-week-section-title {
        font-size: 20px;
    }
    
    .edc-week-section-date-range {
        font-size: 13px;
    }
    
    .edc-week-event-card {
        padding: 20px;
    }
    
    .edc-week-event-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .edc-week-event-left {
        width: 100%;
    }
    
    .edc-week-event-right {
        flex: 1;
        width: 100%;
        align-items: center;
    }
    
    .edc-week-event-title {
        font-size: 18px;
    }
    
    .edc-week-event-excerpt {
        font-size: 14px;
    }
    
    /* Events List Below Calendar - Mobile */
    .edc-events-list-below-calendar {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .edc-events-list-below-calendar .col-sm-8,
    .edc-events-list-below-calendar .col-sm-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .edc-events-list-below-calendar .col-sm-4 {
        text-align: left;
        margin-top: 15px;
    }
    
    .edc-event-list-content {
        flex-direction: column;
    }
    
    .edc-event-list-meta {
        flex: 1;
        text-align: left;
    }
    
    .edc-event-meta-inline {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}

/* Small Mobile Devices (320px - 480px) */
@media screen and (max-width: 480px) {
    .edc-calendar-wrapper {
        padding: 10px !important;
    }
    
    .edc-calendar-main-title {
        font-size: 20px;
    }
    
    .edc-calendar-view-button {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .edc-calendar-title {
        font-size: 18px;
    }
    
    .edc-nav-link {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .edc-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .edc-calendar-table {
        font-size: 11px;
    }
    
    .edc-calendar-table thead th {
        font-size: 11px;
        padding: 8px 4px;
    }
    
    .edc-day-cell {
        height: 80px;
        min-height: 80px;
        padding: 4px;
    }
    
    .edc-day-number {
        font-size: 12px;
    }
    
    .edc-event-block {
        font-size: 9px !important;
        padding: 3px 4px !important;
    }
    
    .edc-calendar-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px 0;
    }
    
    .edc-legend-color {
        width: 16px;
        height: 16px;
    }
    
    .edc-legend-label {
        font-size: 11px;
    }
    
    /* Event Modal - Small Mobile - Popup Style */
    .edc-event-modal {
        width: 95% !important;
        padding: 0 16px 16px 16px !important;
        max-height: 80vh !important;
    }
    
    .edc-event-modal-header {
        margin-bottom: 12px !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .edc-event-modal-close {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        font-size: 22px !important;
        padding: 6px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 10003 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    
    .edc-event-modal-header-title {
        font-size: 14px !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .edc-event-modal-title {
        font-size: 16px !important;
        padding-right: 0 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
    }
    
    .edc-event-modal-meta {
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }
    
    .edc-event-modal-url {
        font-size: 13px !important;
        margin-bottom: 12px !important;
    }
    
    .edc-event-modal-description {
        font-size: 12px !important;
        line-height: 1.5 !important;
        overflow-y: auto !important;
        max-height: 35vh !important;
        padding: 0 8px 0 0 !important;
    }
    
    .edc-event-modal-header-title {
        font-size: 12px !important;
    }
    
    .edc-event-modal-meta {
        font-size: 13px;
        gap: 6px;
    }
    
    .edc-event-modal-url {
        font-size: 13px;
    }
    
    .edc-event-modal-description {
        font-size: 13px;
        overflow: visible !important;
    }
    
    /* List View - Small Mobile */
    .edc-list-title {
        font-size: 18px;
    }
    
    .edc-list-excerpt {
        font-size: 13px;
    }
    
    .edc-list-button {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    /* Week View - Small Mobile */
    .edc-week-section-header {
        padding: 12px 16px;
    }
    
    .edc-week-section-title {
        font-size: 18px;
    }
    
    .edc-week-event-card {
        padding: 16px;
    }
    
    .edc-week-event-title {
        font-size: 16px;
    }
    
    .edc-week-event-excerpt {
        font-size: 13px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .edc-event-block,
    .edc-tab,
    .edc-nav-link,
    .edc-event-modal-close,
    .edc-list-button,
    .edc-register-button,
    .edc-calendar-view-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .edc-event-block {
        padding: 8px !important;
    }
    
    .edc-tab {
        padding: 12px 16px;
    }
}

/* Landscape Mobile Orientation */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .edc-event-modal {
        padding: 0 16px 16px 16px;
    }
    
    .edc-event-modal-title {
        font-size: 18px;
    }
    
    .edc-event-modal-description {
        overflow: visible !important;
    }
    
    .edc-day-cell {
        height: 90px;
        min-height: 90px;
    }
}

/* ========================================= Calendar Loader (Scoped Per Instance) ========================================= */
/* Loader positioned absolutely over content area */
.edc-calendar-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    margin-top: 20px; /* Slight offset below center */
}

.edc-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007476;
    border-radius: 50%;
    animation: edc-spin 1s linear infinite;
}

/* Blur effect for calendar content while loading */
.edc-calendar-loading .edc-calendar-grid,
.edc-calendar-loading .edc-event-list {
    filter: blur(2px);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

/* Content areas must be positioned relative for absolute loader positioning */
.edc-calendar-grid,
.edc-event-list {
    position: relative;
    min-height: 200px; /* Ensure space for loader */
}

@keyframes edc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


