/* Calendário de seleção de intervalo (estilo Meta Ads) — ver js/date-range-picker.js.
   Usa os mesmos tokens de cor do resto do painel (var(--card)/--border/--blue/etc.),
   então segue o tema claro/escuro automaticamente sem CSS extra. */

.drp-trigger {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.drp-popover {
    display: none;
    position: absolute;
    z-index: 3000;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    padding: 14px;
    width: 300px;
    backdrop-filter: blur(12px);
}
.drp-popover.drp-open { display: block; }

.drp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.drp-nav {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: background .15s, color .15s;
}
.drp-nav:hover { background: var(--hover); color: var(--text); }

.drp-header-selects {
    display: flex;
    align-items: center;
    gap: 2px;
}
.drp-month-btn, .drp-year-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: default;
    padding: 2px 4px;
}

.drp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}
.drp-weekdays span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

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

.drp-day {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 13px;
    padding: 7px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .12s;
}
.drp-day:hover:not(.drp-day-empty) { background: var(--hover); }
.drp-day-empty { cursor: default; visibility: hidden; }

.drp-day-today { font-weight: 700; color: var(--blue); }

.drp-day-inrange {
    /* --blue é #2563eb em ambos os temas (claro/escuro) — rgba fixo em vez de
       color-mix() por compatibilidade (color-mix não é usado em nenhum outro
       lugar do projeto). */
    background: rgba(37,99,235,0.18);
    border-radius: 0;
}
.drp-day-range-start { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.drp-day-range-end   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.drp-day-selected {
    background: var(--blue) !important;
    color: #fff !important;
    font-weight: 700;
}

.drp-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.drp-range-label {
    font-size: 12px;
    color: var(--muted);
}
.drp-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media(max-width:768px) {
    .drp-popover { width: calc(100vw - 32px); max-width: 320px; }
}
