/* ── Date Range Picker ── */
.drp-wrapper {
    position: relative;
}
.drp-trigger {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12.5px;
    color: #333;
    min-height: 34px;
    transition: border-color .15s;
}
.drp-trigger:hover { border-color: #adb5bd; }
.drp-open .drp-trigger { border-color: #3699ff; }
.drp-icon { margin-right: 8px; color: #999; font-size: 14px; }
.drp-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drp-text.drp-has-value { color: #333; font-weight: 500; }

/* ── Popup — fixed overlay, NOT inside the sidebar ── */
.drp-popup {
    position: fixed;
    z-index: 1070;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.drp-popup.drp-visible {
    display: flex;
    flex-direction: column;
}

/* ── Inner layout: sidebar + calendars row ── */
.drp-body {
    display: flex;
    flex-direction: row;
}

/* ── Presets sidebar ── */
.drp-sidebar {
    width: 120px;
    padding: 6px 0;
    border-right: 1px solid #eee;
    flex-shrink: 0;
    overflow-y: auto;
}
.drp-preset {
    padding: 5px 12px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.drp-preset:hover { background: #f4f5f8; }
.drp-preset.active {
    background: #3699ff;
    color: #fff;
}

/* ── Calendars area ── */
.drp-calendars {
    padding: 6px 10px;
    position: relative;
}
.drp-cal-input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

/* Flatpickr overrides */
.drp-calendars .flatpickr-calendar {
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    font-size: 13px;
}
.drp-calendars .flatpickr-months .flatpickr-month {
    height: 30px;
}
.drp-calendars .flatpickr-current-month {
    font-size: 13px;
    padding-top: 4px;
}
.drp-calendars .flatpickr-day {
    height: 30px;
    line-height: 30px;
    font-size: 12.5px;
}
.drp-calendars .flatpickr-day.selected,
.drp-calendars .flatpickr-day.startRange,
.drp-calendars .flatpickr-day.endRange {
    background: #3699ff !important;
    border-color: #3699ff !important;
    color: #fff !important;
}
.drp-calendars .flatpickr-day.inRange {
    background: #e8f0fe !important;
    border-color: #e8f0fe !important;
    box-shadow: -5px 0 0 #e8f0fe, 5px 0 0 #e8f0fe !important;
}
.drp-calendars .flatpickr-day.today:not(.selected):not(.startRange):not(.endRange) {
    border-color: #3699ff !important;
}
.drp-calendars span.flatpickr-weekday {
    font-size: 11px;
    color: #999;
}

/* ── Footer ── */
.drp-footer {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-top: 1px solid #eee;
    gap: 8px;
    background: #fafbfc;
    border-radius: 0 0 4px 4px;
}
.drp-time-row {
    display: flex;
    gap: 20px;
}
.drp-time-group {
    display: flex;
    align-items: center;
    gap: 2px;
}
.drp-time-group span { font-size: 13px; color: #999; }
.drp-time-sel {
    padding: 2px 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    width: 48px;
    background: #fff;
}
.drp-footer-preview {
    flex: 1;
    font-size: 12px;
    color: #888;
    text-align: center;
}
.drp-footer-btns {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.drp-footer-btns .btn {
    font-size: 12px;
    padding: 4px 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ── Responsive ── */
@media (max-width: 680px) {
    .drp-body { flex-direction: column; }
    .drp-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        padding: 4px 6px;
    }
    .drp-preset { padding: 3px 8px; }
}
