/* ==========================================
   AIRLINE-STYLE EVENT DATE PICKER
   Duration-first approach with visual calendar
   ========================================== */

/* ==========================================
   DURATION TYPE SELECTOR (Single / Multi toggle)
   ========================================== */

.duration-type-selector {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.duration-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: #fff;
    font-family: inherit;
}

.duration-type-btn:hover {
    background: rgba(127, 255, 0, 0.05);
    border-color: rgba(127, 255, 0, 0.3);
}

.duration-type-btn.active {
    background: rgba(127, 255, 0, 0.08);
    border-color: #7FFF00;
    box-shadow: 0 0 20px rgba(127, 255, 0, 0.1);
}

.duration-type-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.duration-type-info {
    display: flex;
    flex-direction: column;
}

.duration-type-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    margin-bottom: 2px;
}

.duration-type-desc {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.duration-type-btn.active .duration-type-label {
    color: #7FFF00;
}

/* ==========================================
   DAY COUNT SELECTOR (Multi-day options)
   ========================================== */

.multi-day-options {
    animation: calSlideDown 0.3s ease;
}

@keyframes calSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.day-count-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.day-count-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.day-count-btn:hover {
    background: rgba(127, 255, 0, 0.08);
    border-color: rgba(127, 255, 0, 0.3);
}

.day-count-btn.active {
    background: rgba(127, 255, 0, 0.12);
    border-color: #7FFF00;
    color: #7FFF00;
}

.custom-days-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    animation: calSlideDown 0.2s ease;
}

.custom-days-input input {
    width: 80px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-family: inherit;
}

.custom-days-input input:focus {
    outline: none;
    border-color: #7FFF00;
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.2);
}

.custom-days-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ==========================================
   VISUAL CALENDAR PICKER
   ========================================== */

.event-calendar-picker {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-top: 8px;
}

/* Calendar header with nav arrows */
.calendar-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cal-nav-btn:hover {
    background: rgba(127, 255, 0, 0.1);
    border-color: rgba(127, 255, 0, 0.3);
}

.cal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cal-month-display {
    display: flex;
    gap: 40px;
}

.cal-month-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    min-width: 140px;
    text-align: center;
}

/* Two-month grid */
.cal-months-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.cal-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* Day-of-week headers */
.cal-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Individual day cells */
.cal-day {
    position: relative;
    text-align: center;
    padding: 10px 4px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
}

.cal-day:hover:not(.disabled):not(.empty) {
    background: rgba(127, 255, 0, 0.1);
}

.cal-day.empty {
    cursor: default;
}

.cal-day.disabled {
    color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
}

.cal-day.today {
    color: #7FFF00;
    font-weight: 700;
}

.cal-day.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7FFF00;
}

/* ==========================================
   RANGE HIGHLIGHTING (Booking.com style)
   ========================================== */

.cal-day.range-start {
    background: #7FFF00;
    color: #0F2A2A;
    font-weight: 700;
    border-radius: 10px 0 0 10px;
}

.cal-day.range-end {
    background: #7FFF00;
    color: #0F2A2A;
    font-weight: 700;
    border-radius: 0 10px 10px 0;
}

.cal-day.range-start.range-end {
    border-radius: 10px;
}

.cal-day.in-range {
    background: rgba(127, 255, 0, 0.15);
    color: #7FFF00;
}

/* Hover preview before clicking */
.cal-day.range-preview {
    background: rgba(127, 255, 0, 0.08);
    color: rgba(127, 255, 0, 0.6);
}

.cal-day.range-preview-start {
    background: rgba(127, 255, 0, 0.2);
    border-radius: 10px 0 0 10px;
    color: rgba(127, 255, 0, 0.8);
}

.cal-day.range-preview-end {
    background: rgba(127, 255, 0, 0.2);
    border-radius: 0 10px 10px 0;
    color: rgba(127, 255, 0, 0.8);
}

.cal-day.range-preview-start.range-preview-end {
    border-radius: 10px;
}

/* ==========================================
   SELECTION SUMMARY BAR
   ========================================== */

.cal-selection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-top: 16px;
    background: rgba(127, 255, 0, 0.06);
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 12px;
    animation: calSlideDown 0.3s ease;
}

.cal-summary-dates {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cal-summary-block {
    text-align: center;
}

.cal-summary-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.cal-summary-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #7FFF00;
    white-space: nowrap;
}

.cal-summary-arrow {
    font-size: 20px;
    color: rgba(127, 255, 0, 0.5);
    padding: 0 4px;
}

.cal-summary-duration {
    padding: 6px 14px;
    background: rgba(127, 255, 0, 0.12);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #7FFF00;
    white-space: nowrap;
}

/* ==========================================
   TIME SELECTION
   ========================================== */

.time-selection-section {
    animation: calSlideDown 0.3s ease;
}

.time-picker-row {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.time-picker-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-picker-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%237FFF00' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.time-select:focus {
    outline: none;
    border-color: #7FFF00;
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.15);
}

.time-select option {
    background: #1a2a1a;
    color: #fff;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .duration-type-selector {
        flex-direction: column;
    }

    .cal-months-grid {
        grid-template-columns: 1fr;
    }

    .cal-month-display {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .cal-month-title.cal-month-title-2 {
        display: none;
    }

    .cal-selection-summary {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .time-picker-row {
        flex-direction: column;
    }

    .day-count-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .event-calendar-picker {
        padding: 12px;
    }

    .cal-day {
        padding: 8px 2px;
        font-size: 13px;
    }

    .day-count-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .duration-type-btn {
        padding: 12px 14px;
    }

    .duration-type-icon {
        font-size: 22px;
    }
}
