/* assets/css/monthly-calendar.css - Interactive Monthly Calendar for RunningRadio TV */

.rrtv-monthly-calendar-wrapper {
    background: #0A0A0D;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(57, 255, 20, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(0, 229, 255, 0.04) 0%, transparent 40%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin: 30px auto;
    max-width: 1000px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    font-family: var(--font-body, 'Inter', sans-serif);
    color: #ffffff;
    box-sizing: border-box;
}

/* Header & Controls */
.rrtv-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.rrtv-cal-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rrtv-cal-icon {
    font-size: 1.6rem;
    color: #39FF14;
}

.rrtv-cal-month-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.rrtv-cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rrtv-cal-btn-nav {
    background: #121216;
    border: 1px solid #202028;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.rrtv-cal-btn-nav:hover {
    border-color: #39FF14;
    color: #39FF14;
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

.rrtv-cal-btn-today {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rrtv-cal-btn-today:hover {
    background: #39FF14;
    color: #000;
    border-color: #39FF14;
}

/* Day Headers (LUN .. DOM) */
.rrtv-cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.rrtv-cal-day-label {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    font-weight: 800;
    color: #888894;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rrtv-cal-day-label.sat {
    color: #39FF14;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.rrtv-cal-day-label.sun {
    color: #00E5FF;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Main Grid */
.rrtv-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    touch-action: pan-y;
}

.rrtv-cal-cell {
    background: #121216;
    border: 1px solid #202028;
    border-radius: 12px;
    min-height: 80px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

.rrtv-cal-cell.other-month {
    opacity: 0.25;
    background: #0d0d10;
    border-color: rgba(255, 255, 255, 0.04);
}

.rrtv-cal-cell.has-events {
    cursor: pointer;
    border-color: rgba(255, 255, 255, 0.2);
}

.rrtv-cal-cell.has-events:hover {
    transform: translateY(-2px);
    border-color: #39FF14;
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.2);
    background: #181820;
}

.rrtv-cal-cell.sat.has-events:hover {
    border-color: #39FF14;
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.25);
}

.rrtv-cal-cell.sun.has-events:hover {
    border-color: #00E5FF;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.25);
}

.rrtv-cal-cell.is-today {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.03);
}

.rrtv-cal-cell.selected {
    border-color: #39FF14 !important;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4) !important;
    background: #1c221e !important;
}

/* Day Number */
.rrtv-cal-day-num {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: #e0e0e0;
}

.rrtv-cal-cell.sat .rrtv-cal-day-num {
    color: #ffffff;
}

.rrtv-cal-cell.sun .rrtv-cal-day-num {
    color: #ffffff;
}

/* Event Badges inside Cell */
.rrtv-cal-events-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}

.rrtv-cal-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(57, 255, 20, 0.15);
    color: #39FF14;
    border: 1px solid rgba(57, 255, 20, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.rrtv-cal-badge.badge-trail {
    background: rgba(0, 229, 255, 0.15);
    color: #00E5FF;
    border-color: rgba(0, 229, 255, 0.3);
}

.rrtv-cal-badge.badge-mtb {
    background: rgba(255, 153, 0, 0.15);
    color: #FF9900;
    border-color: rgba(255, 153, 0, 0.3);
}

.rrtv-cal-badge.badge-duatlon {
    background: rgba(255, 51, 102, 0.15);
    color: #FF3366;
    border-color: rgba(255, 51, 102, 0.3);
}

.rrtv-cal-count-pill {
    font-size: 0.75rem;
    font-weight: 800;
    color: #39FF14;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rrtv-cal-cell.sun .rrtv-cal-count-pill {
    color: #00E5FF;
}

/* Event Detail Sheet / Modal */
.rrtv-cal-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rrtv-cal-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.rrtv-cal-modal-content {
    background: #121216;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.rrtv-cal-modal-backdrop.active .rrtv-cal-modal-content {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .rrtv-cal-modal-backdrop {
        align-items: center;
    }
    .rrtv-cal-modal-content {
        border-radius: 20px;
        max-height: 80vh;
        transform: scale(0.9) translateY(20px);
    }
    .rrtv-cal-modal-backdrop.active .rrtv-cal-modal-content {
        transform: scale(1) translateY(0);
    }
}

.rrtv-cal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.rrtv-cal-modal-date-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.rrtv-cal-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #aaaaaa;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rrtv-cal-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Event Item Cards in Modal with Vivid Flyer Background */
.rrtv-cal-event-card {
    position: relative;
    background: #181820;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.rrtv-cal-event-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(10, 10, 14, 0.68) 0%, rgba(10, 10, 14, 0.55) 100%);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.rrtv-cal-event-card > * {
    position: relative;
    z-index: 2;
}

.rrtv-cal-event-card:hover {
    border-color: rgba(57, 255, 20, 0.6);
    box-shadow: 0 8px 30px rgba(57, 255, 20, 0.2);
    transform: translateY(-2px);
}

.rrtv-cal-event-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.rrtv-cal-event-name {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.8);
}

.rrtv-cal-event-meta {
    font-size: 0.9rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.rrtv-cal-event-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rrtv-cal-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.rrtv-cal-btn-primary {
    background: #39FF14;
    color: #000000;
}

.rrtv-cal-btn-primary:hover {
    background: #00ff77;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.rrtv-cal-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

.rrtv-cal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Paywall / Auth Conversion Modal */
.rrtv-auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.rrtv-auth-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.rrtv-auth-modal-card {
    background: #121216;
    border: 1px solid #39FF14;
    box-shadow: 0 0 35px rgba(57, 255, 20, 0.25);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 30px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.rrtv-auth-modal-backdrop.active .rrtv-auth-modal-card {
    transform: scale(1);
}

/* Responsiveness */
@media (max-width: 640px) {
    .rrtv-monthly-calendar-wrapper {
        padding: 16px;
        margin: 20px 0;
        border-radius: 16px;
    }
    
    .rrtv-cal-month-title {
        font-size: 1.15rem;
    }
    
    .rrtv-cal-cell {
        min-height: 65px;
        padding: 4px;
    }
    
    .rrtv-cal-day-num {
        font-size: 0.85rem;
    }
    
    .rrtv-cal-badge {
        font-size: 0.6rem;
        padding: 2px 4px;
    }

    .rrtv-cal-day-label {
        font-size: 0.75rem;
    }
}
