/* Card Styles */
.card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), var(--glow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), var(--glow);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 40px;
}

/* Date Display */
.date-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hijri-date-card, .gregorian-date-card {
    text-align: center;
    padding: 20px;
}

.hijri-date-card h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.gregorian-date-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.moon-phase {
    margin-top: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.moon-phase i {
    font-size: 32px;
    color: var(--warning-color);
}

/* Calendar Navigation */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
}

.current-month {
    text-align: center;
}

.current-month h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.current-month p {
    color: var(--text-secondary);
    font-size: 14px;
}

.mobile-only-selected-day {
    display: none;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Calendar Controls */
.calendar-controls {
    padding: 15px 20px;
}

.view-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.view-btn {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Selected Date Display */
.selected-date-display {
    padding: 20px;
}

.selected-date-display h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.date-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.hijri-info, .gregorian-info {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 10px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}
.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}
.calendar-day:hover::before {
    left: 100%;
}

.calendar-day:not(.day-name):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), var(--glow);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: var(--accent); /* Using accent from style.css */
    color: white;
    box-shadow: 0 0 15px var(--accent-glow); /* Using accent-glow from style.css */
}

.calendar-day.selected {
    border: 2px solid var(--accent); /* Using accent from style.css */
    box-shadow: 0 0 15px var(--accent); /* Using accent from style.css */
}

.calendar-day.day-name {
    background: transparent;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: red; /* Explicitly red for testing */
    z-index: 10; /* Ensure it's on top */
}

/* Ramadan Day Styling */
.calendar-day.ramadan-day {
    background: linear-gradient(135deg, rgb(7 217 255 / 15%) 0%, rgb(20 0 255 / 15%) 100%);
    border: 1px solid rgb(132 7 255 / 30%);
}

.calendar-day.ramadan-day:hover {
    background: linear-gradient(135deg, rgba(7, 217, 255, 0.25) 0%, rgba(20, 0, 255, 0.25) 100%);
    border-color: rgba(132, 7, 255, 0.5);
}

.calendar-day.ramadan-day::before {
    content: '☪';
    position: absolute;
    bottom: 2px;
    left: 5px;
    font-size: 10px;
    color: var(--warning-color);
    opacity: 0.7;
}

.calendar-day.ramadan-day.today {
    background: linear-gradient(135deg, var(--accent) 0%, var(--warning-color) 100%);
    color: white;
}

.calendar-day .gregorian-date {
    font-size: 14px; /* Reduced font size */
    position: absolute; /* Position relative to .calendar-day */
    top: 5px;
    left: 5px;
    color: var(--text-primary); /* Ensure visibility */
}

.calendar-grid .hijri-date {
        /* Reset conflicting styles from style.css */
        background: none;
        padding: 15px 0px;
        border: none;
        box-shadow: none;
        border-radius: 0;
        font-size: 17px;
        font-weight: bold;

    }

/* Events Section */
.events-section {
    padding: 20px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.events-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.events-search {
    position: relative;
}

.event-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 300px; /* Increased min-width */
    transition: all 0.3s ease;
}

.event-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--glow); /* Added box-shadow */
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-card {
    padding: 20px;
    border-radius: 12px;
    background: var(--bg-secondary);
    display: flex;
    gap: 20px;
    align-items: flex-start; /* Changed to flex-start */
    flex-wrap: wrap; /* Added flex-wrap */
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative; /* Added */
    overflow: hidden; /* Added */
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), var(--glow);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.event-card:hover::before {
    left: 100%;
}



.event-date {
    text-align: center;
    flex-shrink: 0;
    flex-basis: 80px;
}

.event-date .hijri {
    color: var(--primary-color);
    display: block;
}

.event-date .gregorian {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
}

.event-info {
    flex-grow: 1;
}

.event-info h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.event-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.event-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-card h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.stat-card p {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}


.countdown-time span {
    background: var(--primary-color-alpha);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 28px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-display {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .events-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .events-search {
        max-width: 100%;
        flex-grow: 1;
        min-width: unset;
        width: 100%;
    }

    .event-card {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .event-date {
        flex-basis: 60px;
    }

    .event-info h4 {
        font-size: 16px;
    }

    .event-info p {
        font-size: 12px;
    }

    .event-type {
        font-size: 10px;
        padding: 3px 8px;
    }

    .event-search-input {
        padding: 10px 40px 10px 15px;
        font-size: 14px;
        border-radius: 12px;
        min-width: unset;
        width: 100%;
    }

    .search-icon {
        right: 12px;
        font-size: 16px;
    }
    
    .view-controls {
        gap: 8px; /* Reduced gap */
        justify-content: center; /* Center align buttons when wrapped */
        flex-wrap: wrap;
    }

    .view-btn {
        padding: 8px 12px; /* Reduced padding */
        font-size: 13px; /* Slightly smaller font */
        gap: 6px; /* Reduced gap within button */
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 4px;
    }
    
    .gregorian-date {
        font-size: 10px;
    }
    
    .calendar-grid .hijri-date {
        font-size: 14px;
        font-weight: bold;
    }

    /* Only font size adjustments for calendar-nav and its children */


    .hijri-selected-date,
    .gregorian-selected-date {
        display: none; /* Hide in mobile version */
    }

    

    .mobile-only-selected-day {
        display: block;
    }
    
    .countdown-time span {
        padding: 8px 12px;
        font-size: 19px;
    }
}

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--danger-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* No Events Message */
.no-events {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-events i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}/* Moon Phase Display */
.moon-phase {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 32px;
}

.moon-phase h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 20px;
}

.moon-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.moon-phase-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.moon-age {
    font-size: 14px;
    color: var(--text-secondary);
}

.countdown-display {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.countdown-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.countdown-time {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-bottom: 10px;
}




/* Event Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: var(--bg-card);
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 15px;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-button {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.event-dot {
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* ===== RAMADAN CALENDAR STYLES ===== */

.ramadan-calendar-section {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 16px;
    margin-top: 20px;
}

.ramadan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ramadan-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ramadan-title i {
    font-size: 28px;
    color: var(--warning-color);
}

.ramadan-title h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.close-ramadan-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-ramadan-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* Ramadan Info Card */
.ramadan-info-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.ramadan-info-card::before {
    content: '☪';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.1;
    color: var(--warning-color);
}

.ramadan-year-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ramadan-hijri-year {
    font-size: 22px;
    font-weight: 700;
    color: var(--warning-color);
}

.ramadan-gregorian-range {
    font-size: 14px;
    color: var(--text-secondary);
}

.ramadan-countdown {
    text-align: right;
    z-index: 1;
}

.ramadan-countdown .countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.ramadan-countdown .countdown-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.ramadan-current-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ramadan-current-day .day-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.ramadan-current-day .day-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* === RAMADAN TIMETABLE SECTION === */
.ramadan-timetable-section {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

/* Ramadan Section Header with Close Button */
.section-header-with-close {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-title i {
    color: var(--primary);
}

.close-section-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-section-btn:hover {
    background: var(--hover);
    color: var(--text-primary);
}

/* Today's Timing Card */
.todays-timing-card {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.todays-timing-card h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    text-align: center;
}

.timing-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sehri-time, .iftar-time {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.iftar-time {
    flex-direction: row-reverse;
    text-align: right;
}

.timing-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sehri-icon {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: #ffeaa7;
}

.iftar-icon {
    background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
    color: white;
}

.timing-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timing-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.timing-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.timing-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.fasting-hours {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.fasting-hours i {
    font-size: 20px;
    color: var(--accent);
}

/* Location Selection */
.ramadan-location {
    margin-bottom: 24px;
    position: relative;
}

/* Timetable Location - same as ramadan-location */
.timetable-location {
    margin-bottom: 24px;
    position: relative;
}

.timetable-location label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.location-input-wrapper {
    display: flex;
    gap: 8px;
}

.ramadan-location-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.ramadan-location-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.use-location-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.use-location-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.location-suggestions {
    position: absolute;
    width: calc(100% - 60px);
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 4px;
    z-index: 100;
    display: none;
}

.location-suggestions.active {
    display: block;
}

.location-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover {
    background: var(--bg-secondary);
}

/* Ramadan Timetable */
.ramadan-timetable {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.timetable-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 50px;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.timetable-body {
    max-height: 500px;
    overflow-y: auto;
}

.timetable-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 50px;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    align-items: center;
    border-left: 4px solid transparent;
}

/* Row status glow styles */
.timetable-row.status-fasted {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--success);
    box-shadow: inset 0 0 12px rgba(16, 185, 129, 0.15);
}

.timetable-row.status-missed {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--danger);
    box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.15);
}

.timetable-row.status-makeup {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--warning);
    box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.15);
}

.timetable-row:hover {
    background: var(--bg-card);
}

.timetable-row.today {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-left: 4px solid var(--accent);
    box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Today row with status - status takes priority for border color */
.timetable-row.today.status-fasted {
    border-left: 4px solid var(--success);
}

.timetable-row.today.status-missed {
    border-left: 4px solid var(--danger);
}

.timetable-row.today.status-makeup {
    border-left: 4px solid var(--warning);
}

.timetable-row.passed {
    opacity: 0.6;
}

.timetable-row .day-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.timetable-row .date-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
}

.timetable-row .hijri-date {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    /* Reset calendar grid hijri styles */
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.timetable-row .gregorian-date {
    position: static !important; /* Override any absolute positioning */
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Fasting Status Dot - Middle Position */
.fasting-status-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.timetable-row .time-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.timetable-row .time-value.sehri {
    color: #a29bfe;
}

.timetable-row .time-value.iftar {
    color: #fdcb6e;
}

.timetable-row .time-value.taraweeh {
    color: #74b9ff;
}

/* Fasting Status Dot */
.fasting-status {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fasting-status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fasting-status-dot:hover {
    transform: scale(1.2);
}

.fasting-status-dot.fasted {
    background-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.fasting-status-dot.missed {
    background-color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.fasting-status-dot.makeup {
    background-color: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.fasting-status-dot.pending {
    background-color: rgba(148, 163, 184, 0.5);
    border: 2px solid transparent;
}

.timetable-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

.timetable-loading i {
    font-size: 32px;
    color: var(--accent);
}

/* Ramadan Actions */
.ramadan-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ramadan-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.ramadan-action-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.ramadan-action-btn i {
    font-size: 16px;
}

/* Timetable Action Button - same as ramadan */
.timetable-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.timetable-action-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.timetable-action-btn i {
    font-size: 16px;
}

/* Timetable Actions Container */
.timetable-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

/* Timetable location input - same as ramadan */
.timetable-location-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.timetable-location-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive Ramadan Calendar */
@media (max-width: 768px) {
    .ramadan-info-card {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .ramadan-countdown {
        text-align: center;
    }

    .timing-display {
        flex-direction: column;
        gap: 20px;
    }

    .sehri-time, .iftar-time {
        flex-direction: row !important;
        text-align: left !important;
        justify-content: center;
    }

    .timing-divider {
        padding: 10px 0;
    }

    .fasting-hours {
        flex-direction: row;
        gap: 8px;
    }

    .timetable-header,
    .timetable-row {
        grid-template-columns: 45px 1fr 65px 65px 40px;
        font-size: 12px;
        gap: 6px;
        padding: 12px;
    }

    .timetable-row .day-number {
        font-size: 16px;
    }

    .timetable-row .time-value {
        font-size: 13px;
    }

    .ramadan-actions {
        flex-direction: column;
    }

    .ramadan-action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .timetable-header,
    .timetable-row {
        grid-template-columns: 40px 1fr 55px 55px 30px;
    }

    /* Hide "Ramadan X" text on mobile, only show Gregorian date */
    .timetable-row .hijri-date {
        display: none;
    }

    .timetable-row .date-info {
        justify-content: center;
    }

    .timetable-row .gregorian-date {
        font-size: 13px;
        font-weight: 500;
        color: var(--text-primary);
    }

    .timing-value {
        font-size: 24px;
    }

    .timing-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Light mode fasting status dots */
[data-theme="light"] .fasting-status-dot.pending {
    border-color: #cbd5e1;
}

[data-theme="light"] .fasting-status-dot.fasted {
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

[data-theme="light"] .fasting-status-dot.missed {
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

[data-theme="light"] .fasting-status-dot.makeup {
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}
