/**
 * Single Date Picker Component Styling
 * Inline calendar popup for single date selection
 */

/* ==================== SINGLE DATE PICKER ==================== */
.single-date-calendar {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    min-width: 280px;
    border: 1px solid #dddfe0;
    border-radius: 12px;
    background-image: url("../../images/bg_noise.webp"), linear-gradient(180deg, #f8f8f7, #f1f0ee);
    background-position: 0 0, 0 0;
    background-size: auto, auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    animation: fadeIn 0.2s ease-out;
}

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

/* Calendar Header */
.single-date-calendar .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.single-date-calendar .calendar-nav-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.single-date-calendar .calendar-nav-btn:hover {
    background: #f3f4f6;
    border-color: #2d8998;
    color: #2d8998;
}

.single-date-calendar .calendar-month-year {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

/* Calendar Weekdays */
.single-date-calendar .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.single-date-calendar .calendar-weekdays > div {
    padding: 6px 4px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

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

.single-date-calendar .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #2c3e50;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: white;
}

.single-date-calendar .calendar-day:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.single-date-calendar .calendar-day-other {
    color: #9ca3af;
    background: transparent;
}

.single-date-calendar .calendar-day-other:hover {
    background: #f9fafb;
}

.single-date-calendar .calendar-day-selected {
    background: #2d8998;
    color: white;
    font-weight: 600;
    border-color: #2d8998;
}

.single-date-calendar .calendar-day-selected:hover {
    background: #236e7c;
    border-color: #236e7c;
}

.single-date-calendar .calendar-day-today {
    border-color: #2d8998;
    font-weight: 600;
}

/* Date Picker Trigger (similar to FilterDatePicker) */
.date-picker-trigger {
    position: relative;
}

.date-picker-trigger .date-range-input {
    width: 100%;
    padding: 12px 14px;
    padding-right: 70px; /* Space for icons */
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    background: #f8f9fa;
    color: #2c3e50;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.date-picker-trigger .date-range-input:focus {
    outline: none;
    border-color: #36a4b5;
}

.date-picker-trigger .date-range-input::placeholder {
    color: #9ca3af;
}

.date-picker-trigger .date-range-clear {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 50%;
    font-size: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

.date-picker-trigger .date-range-clear:hover {
    background: #2d8998;
    color: white;
}

.date-picker-trigger .date-range-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #6b7280;
    pointer-events: none;
}

/* Filter Label Inline (for forms) */
.filter-label-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.filter-label-inline label {
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

/* ==================== DARK MODE ==================== */
@media (prefers-color-scheme: dark) {
    .single-date-calendar {
        border-color: rgba(255, 255, 255, 0.12);
        background-image: none;
        background-color: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .single-date-calendar .calendar-nav-btn {
        border-color: #4b5563;
        background: #374151;
        color: #e5e7eb;
    }

    .single-date-calendar .calendar-nav-btn:hover {
        background: #4b5563;
        border-color: #2d8998;
        color: #2d8998;
    }

    .single-date-calendar .calendar-month-year {
        color: #f3f4f6;
    }

    .single-date-calendar .calendar-weekdays > div {
        color: #9ca3af;
    }

    .single-date-calendar .calendar-day {
        color: #e5e7eb;
        background: #374151;
    }

    .single-date-calendar .calendar-day:hover {
        background: #4b5563;
        border-color: #6b7280;
    }

    .single-date-calendar .calendar-day-other {
        color: #6b7280;
        background: transparent;
    }

    .single-date-calendar .calendar-day-other:hover {
        background: #374151;
    }

    .single-date-calendar .calendar-day-selected {
        background: #2d8998;
        color: white;
        border-color: #2d8998;
    }

    .single-date-calendar .calendar-day-selected:hover {
        background: #236e7c;
        border-color: #236e7c;
    }

    .single-date-calendar .calendar-day-today {
        border-color: #2d8998;
    }

    .date-picker-trigger .date-range-input {
        border-color: rgba(255, 255, 255, 0.12);
        background: #111315;
        color: #e5e7eb;
    }

    .date-picker-trigger .date-range-input:focus {
        border-color: #36a4b5;
    }

    .date-picker-trigger .date-range-input::placeholder {
        color: #6b7280;
    }

    .date-picker-trigger .date-range-clear {
        background: #4b5563;
        color: #e5e7eb;
    }

    .date-picker-trigger .date-range-clear:hover {
        background: #2d8998;
        color: white;
    }

    .date-picker-trigger .date-range-icon {
        color: #9ca3af;
    }

    .filter-label-inline label {
        color: #e5e7eb;
    }
}

