/* ==========================================================================
   HYPERCAL CUSTOM DATE PICKER COMPONENT
   Clean, Lightweight, Modern Calendar Popover for HyperCal
   ========================================================================== */

.hc-datepicker-popover {
    position: absolute;
    z-index: 2050;
    width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    padding: 14px;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    user-select: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: none;
}

.hc-datepicker-popover.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.hc-dp-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(1px);
    z-index: 2040;
    display: none;
}

.hc-dp-backdrop.show {
    display: block;
}

/* Mobile Modal Centering */
@media (max-width: 576px) {
    .hc-datepicker-popover {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -46%) !important;
        width: 90vw !important;
        max-width: 330px !important;
        z-index: 2050 !important;
    }
    .hc-datepicker-popover.show {
        transform: translate(-50%, -50%) !important;
    }
}

/* Header */
.hc-dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hc-dp-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.hc-dp-nav-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hc-dp-nav-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.hc-dp-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Weekday Grid */
.hc-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    margin-bottom: 6px;
}

.hc-dp-weekday {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    padding: 4px 0;
}

/* Days Grid */
.hc-dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.hc-dp-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1e293b;
    border-radius: 7px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.12s ease;
    position: relative;
}

.hc-dp-day:hover:not(.disabled):not(.selected) {
    background: #f1f5f9;
    color: #0f172a;
}

.hc-dp-day.other-month {
    color: #94a3b8;
    font-weight: 400;
}

.hc-dp-day.today {
    border-color: #cbd5e1;
    color: #dc2626;
    font-weight: 700;
}

.hc-dp-day.today:not(.selected)::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #dc2626;
}

.hc-dp-day.selected {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 700;
}

.hc-dp-day.disabled {
    color: #cbd5e1 !important;
    cursor: not-allowed;
    background: transparent !important;
}

/* Footer */
.hc-dp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.hc-dp-btn {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hc-dp-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.hc-dp-btn-primary {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.hc-dp-btn-primary:hover {
    background: #b91c1c;
    color: #ffffff;
    border-color: #b91c1c;
}
