/* --- Shared Admin Date Picker Styles --- */
.admin-datepicker-popup {
    position: absolute;
    z-index: 2000; /* High z-index for public side too */
    width: 320px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.25rem;
    display: none;
    user-select: none;
    font-family: 'Inter', sans-serif;
}

.admin-datepicker-popup.active {
    display: block;
    animation: pickerFadeIn 0.2s ease-out;
}

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

.datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.datepicker-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.datepicker-nav {
    display: flex;
    gap: 0.5rem;
}

.datepicker-nav button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.datepicker-nav button:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.5rem;
}

.datepicker-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    padding: 0.5rem 0;
}

.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.datepicker-day, .day-padded {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: #1e293b;
}

.day-padded {
    color: #cbd5e1;
    cursor: default;
}

.datepicker-day:hover:not(.disabled) {
    background-color: #f1f5f9;
}

.datepicker-day.today {
    color: #2563eb;
    font-weight: 700;
}

.datepicker-day.today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
}

.datepicker-day.selected {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700;
}

.datepicker-day.disabled {
    color: #e2e8f0;
    cursor: not-allowed;
    background: transparent !important;
}

.datepicker-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
}

.datepicker-footer button {
    background: transparent;
    border: none;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.datepicker-footer button:hover {
    background: rgba(37, 99, 235, 0.05);
}

.datepicker-footer .btn-clear {
    color: #ef4444;
}

.datepicker-footer .btn-clear:hover {
    background: rgba(239, 68, 68, 0.05);
}

.custom-date-trigger {
    cursor: pointer !important;
}

.date-input-group {
    position: relative;
    width: 100%;
    display: block;
}

.date-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem !important;
    color: #64748b;
    pointer-events: none;
    z-index: 10;
}
