/* ─── rcDatetimePicker (hotfix) — компактный dropdown ──────────── */

.rc-dtp-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    max-width: 360px;
}
.rc-dtp-field {
    height: 42px;
    padding: 0 12px;
    /* В покое — нейтральная серая рамка, как у обычных input в проекте.
       Раньше тут была var(--ac-border) — слишком яркий синий, поле
       казалось «всегда в focus». */
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    /* Точно такой же фон, что у textarea/.form-control на /polls/create.
       Кастомных переопределений в проекте нет — Bootstrap 5.3 рендерит
       .form-control с background:var(--bs-body-bg) и сам переключает
       значение по data-bs-theme (#212529 для dark, #fff для light).
       Раньше тут был полупрозрачный rgba(255,255,255,.04) — почти
       невидим на чёрном фоне страницы. */
    background: var(--bs-body-bg);
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
[data-theme="light"] .rc-dtp-field {
    border-color: rgba(0, 0, 0, .1);
}
.rc-dtp-field:hover {
    border-color: rgba(255, 255, 255, .2);
}
[data-theme="light"] .rc-dtp-field:hover {
    border-color: rgba(0, 0, 0, .2);
}
.rc-dtp-field:focus-within {
    border-color: var(--ac, #0000BB);
    box-shadow: 0 0 0 3px var(--ac-dim, rgba(0, 0, 187, .15));
}
.rc-dtp-date { flex: 1; min-width: 180px; }
.rc-dtp-date-display {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    flex: 1;
    outline: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
}
.rc-dtp-date-display::placeholder { color: rgba(255, 255, 255, .35); }
[data-theme="light"] .rc-dtp-date-display::placeholder { color: rgba(0, 0, 0, .35); }

.rc-dtp-time {
    flex: 0 0 100px;
    justify-content: center;
}
.rc-dtp-time-display {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.rc-dtp-icon {
    display: inline-flex;
    color: var(--ac, #0000BB);
}

/* ── POPUP — 580 × ~380, dropdown ── */
.rc-dtp-popup {
    position: absolute;
    z-index: 9999;
    width: 580px;
    max-width: calc(100vw - 24px);
    background: #0a0e1a;
    border: 1px solid rgba(0, 0, 187, .5);
    border-radius: 16px;
    padding: 16px 16px 60px 16px;
    box-shadow:
        0 0 24px rgba(0, 0, 187, .4),
        0 8px 32px rgba(0, 0, 0, .5);
    color: #fff;
    display: flex; /* JS меняет на flex при open() */
    flex-direction: row;
    gap: 16px;
    align-items: stretch;
}
[data-theme="light"] .rc-dtp-popup {
    background: #ffffff;
    border-color: rgba(0, 0, 187, .2);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, .12),
        0 4px 12px rgba(0, 0, 187, .08);
    color: var(--rc-black, #020A0A);
}

/* Календарь слева */
.rc-dtp-calendar {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rc-dtp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rc-dtp-cal-header button {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    line-height: 1;
}
.rc-dtp-cal-header button:hover { background: rgba(0, 0, 187, .15); }

.rc-dtp-month-label {
    font-weight: 600;
    font-size: 14px;
}

.rc-dtp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
    text-transform: uppercase;
    text-align: center;
}
[data-theme="light"] .rc-dtp-weekdays { color: rgba(0, 0, 0, .5); }

.rc-dtp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.rc-dtp-day {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    position: relative;
}
.rc-dtp-day:hover:not(.rc-dtp-day-out):not(.rc-dtp-day-selected) {
    background: rgba(0, 0, 187, .15);
}
.rc-dtp-day-out {
    color: rgba(255, 255, 255, .2);
    cursor: default;
}
[data-theme="light"] .rc-dtp-day-out { color: rgba(0, 0, 0, .2); }

.rc-dtp-day-selected {
    background: var(--rc-blue, #0000BB);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(0, 0, 187, .6);
}
[data-theme="light"] .rc-dtp-day-selected { box-shadow: none; }

.rc-dtp-day-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--rc-blue, #0000BB);
}
.rc-dtp-day-selected.rc-dtp-day-today::after { background: #fff; }

/* Разделитель */
.rc-dtp-divider {
    width: 1px;
    background: rgba(0, 0, 187, .3);
    align-self: stretch;
}
[data-theme="light"] .rc-dtp-divider { background: rgba(0, 0, 187, .15); }

/* Блок времени справа */
.rc-dtp-time-panel {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rc-dtp-time-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 187, .1);
    border: 1px solid rgba(0, 0, 187, .3);
    border-radius: 10px;
    cursor: pointer;
    color: inherit;
    text-align: left;
    font: inherit;
}
.rc-dtp-time-header:hover { background: rgba(0, 0, 187, .2); }

.rc-dtp-icon-clock {
    display: inline-flex;
    color: var(--rc-blue, #0000BB);
}

.rc-dtp-time-big {
    font-size: 22px;
    font-weight: 700;
    color: var(--rc-blue, #0000BB);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.rc-dtp-time-sublabel {
    font-size: 11px;
    color: rgba(255, 255, 255, .5);
    margin-top: 2px;
}
[data-theme="light"] .rc-dtp-time-sublabel { color: rgba(0, 0, 0, .5); }

.rc-dtp-time-columns {
    display: flex;
    align-items: stretch;
    gap: 6px;
    height: 140px;
}
.rc-dtp-time-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.rc-dtp-time-col-label {
    font-size: 10px;
    text-align: center;
    color: rgba(255, 255, 255, .5);
    text-transform: uppercase;
}
[data-theme="light"] .rc-dtp-time-col-label { color: rgba(0, 0, 0, .5); }

.rc-dtp-time-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: rgba(0, 0, 0, .2);
    border-radius: 8px;
    scrollbar-width: thin;
}
[data-theme="light"] .rc-dtp-time-list { background: rgba(0, 0, 0, .04); }

.rc-dtp-time-item {
    flex: 0 0 26px;
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
}
.rc-dtp-time-item:hover { background: rgba(0, 0, 187, .2); }
.rc-dtp-time-selected {
    background: var(--rc-blue, #0000BB);
    color: #fff;
    font-weight: 600;
}

.rc-dtp-time-sep {
    align-self: center;
    font-size: 16px;
    color: var(--rc-blue, #0000BB);
    font-weight: 600;
    padding: 0 2px;
}

.rc-dtp-time-note {
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
    line-height: 1.3;
    text-align: center;
}
[data-theme="light"] .rc-dtp-time-note { color: rgba(0, 0, 0, .5); }

/* Футер — абсолютно внизу popup */
.rc-dtp-footer {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 187, .2);
}
.rc-dtp-clear,
.rc-dtp-today {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font: inherit;
}
.rc-dtp-clear { color: #ff5252; }
.rc-dtp-clear:hover { background: rgba(255, 82, 82, .1); }
.rc-dtp-today { color: var(--rc-blue, #0000BB); }
.rc-dtp-today:hover { background: rgba(0, 0, 187, .1); }
.rc-dtp-done {
    background: var(--rc-blue, #0000BB);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}
.rc-dtp-done:hover {
    background: #2255EE;
    box-shadow: 0 0 8px rgba(0, 0, 187, .6);
}

/* ── Date-only режим (input type="date" + data-rc-picker) ──
   Тот же popup без панели времени — компактная ширина под календарь. */
.rc-dtp-popup--date {
    width: 340px;
}

/* Hint под полем «Окончание» — виден только когда выбрано 00:00. */
.rc-dtp-hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ac, #0000BB);
    opacity: 0.85;
    line-height: 1.3;
    max-width: 360px;
}
[data-theme="light"] .rc-dtp-hint {
    color: var(--ac, #0000BB);
    opacity: 0.75;
}
