/* ── OkuuTrack Datepicker ── */

.odp-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.odp-overlay.odp-visible {
    opacity: 1;
    pointer-events: all;
}

.odp-wrap {
    background: #fff;
    border-radius: 16px;
    width: 360px;
    max-width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    overflow: hidden;
    transform: translateY(12px) scale(.97);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), opacity .18s ease;
    opacity: 0;
    position: relative;
}
.odp-overlay.odp-visible .odp-wrap {
    transform: none;
    opacity: 1;
}

/* ── шапка ── */
.odp-header {
    background: var(--primary, #009c4d);
    padding: 16px 18px 14px;
    color: #fff;
}
.odp-header-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .75;
    margin-bottom: 4px;
}
.odp-header-val {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.odp-header-val span { opacity: .65; }

/* range шапка */
.odp-range-chips {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 2px;
}
.odp-chip {
    flex: 1;
    background: rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 6px 10px;
}
.odp-chip-label {
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .7;
}
.odp-chip-val {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1px;
}
.odp-chip.odp-chip-active {
    background: rgba(255,255,255,.32);
    outline: 2px solid rgba(255,255,255,.6);
}
.odp-chip-arrow {
    font-size: 1.1rem;
    opacity: .7;
    flex-shrink: 0;
}

/* ── навигация ── */
.odp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
    border-bottom: 1px solid #f1f5f9;
}
.odp-nav-btn {
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: .9rem;
    transition: background .12s, color .12s;
    flex-shrink: 0;
}
.odp-nav-btn:hover { background: #f1f5f9; color: #1e293b; }
.odp-nav-title {
    display: flex;
    gap: 4px;
    align-items: center;
}
.odp-nav-month,
.odp-nav-year {
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: .95rem;
    color: #1e293b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 7px;
    transition: background .12s;
    font-family: inherit;
}
.odp-nav-month:hover,
.odp-nav-year:hover { background: #f1f5f9; }

/* ── сетка дней ── */
.odp-body { padding: 6px 14px 4px; }

.odp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 2px;
}
.odp-weekdays span {
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 4px 0 5px;
    letter-spacing: .04em;
}

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

.odp-day {
    position: relative;
    border: none;
    background: transparent;
    height: 38px;
    font-size: .84rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
    outline: none;
    font-family: inherit;
}
.odp-day:disabled { color: #d1d5db; cursor: not-allowed; pointer-events: none; }
.odp-day.odp-other { color: #cbd5e1; }
.odp-day.odp-other:hover { background: transparent; }

/* внутренний кружок */
.odp-day::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 8px;
    transition: background .12s, box-shadow .12s;
    z-index: 0;
}
.odp-day span { position: relative; z-index: 1; }

/* hover */
.odp-day:not(:disabled):not(.odp-other):hover::after { background: #f1f5f9; }

/* today */
.odp-day.odp-today span::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary, #009c4d);
}

/* selected (single) */
.odp-day.odp-sel::after {
    background: var(--primary, #009c4d) !important;
}
.odp-day.odp-sel span { color: #fff; }
.odp-day.odp-sel.odp-today span::after { background: #fff; }

/* range background strip */
.odp-day.odp-in-range,
.odp-day.odp-hover-range {
    background: #dcfce7;
}
.odp-day.odp-in-range::after,
.odp-day.odp-hover-range::after { background: transparent; }

/* range start / end */
.odp-day.odp-rs, .odp-day.odp-re {
    background: linear-gradient(to right, #dcfce7 50%, #dcfce7 50%);
}
.odp-day.odp-rs { background: linear-gradient(to left, #dcfce7 50%, transparent 50%); }
.odp-day.odp-re { background: linear-gradient(to right, #dcfce7 50%, transparent 50%); }
.odp-day.odp-rs.odp-re { background: transparent; }
.odp-day.odp-rs::after, .odp-day.odp-re::after {
    background: var(--primary, #009c4d) !important;
}
.odp-day.odp-rs span, .odp-day.odp-re span { color: #fff; }

/* edge: если start и end в одном месяце, первый и последний в ряду */
.odp-day.odp-row-first.odp-in-range,
.odp-day.odp-row-first.odp-hover-range {
    border-radius: 8px 0 0 8px;
    background: #dcfce7;
}
.odp-day.odp-row-last.odp-in-range,
.odp-day.odp-row-last.odp-hover-range {
    border-radius: 0 8px 8px 0;
    background: #dcfce7;
}

/* ── время ── */
.odp-time {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 2px;
    font-size: .82rem;
    color: #64748b;
    font-weight: 500;
}
.odp-time input[type=time] {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .88rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    background: #f8fafc;
    transition: border-color .15s;
}
.odp-time input[type=time]:focus { border-color: var(--primary, #009c4d); }

/* ── подвал ── */
.odp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 14px;
    gap: 8px;
}
.odp-footer-left { display: flex; gap: 4px; }
.odp-btn-ghost {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background .12s, color .12s;
    font-family: inherit;
}
.odp-btn-ghost:hover { background: #f1f5f9; color: #1e293b; }
.odp-btn-apply {
    border: none;
    background: var(--primary, #009c4d);
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    padding: 7px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s, transform .1s;
}
.odp-btn-apply:hover { background: var(--primary-dark, #007a3d); }
.odp-btn-apply:active { transform: scale(.97); }

/* ── панель выбора месяца / года ── */
.odp-panel {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 10;
    display: none;
    flex-direction: column;
    padding: 14px;
    gap: 10px;
    overflow-y: auto;
    border-radius: 16px;
}
.odp-panel.odp-panel-show { display: flex; }
.odp-panel-title {
    font-size: .8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.odp-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.odp-panel-btn {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    padding: 9px 4px;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: border-color .12s, background .12s, color .12s;
    font-family: inherit;
}
.odp-panel-btn:hover { border-color: var(--primary, #009c4d); color: var(--primary, #009c4d); background: #f0fdf4; }
.odp-panel-btn.odp-panel-active { background: var(--primary, #009c4d); color: #fff; border-color: var(--primary, #009c4d); }
.odp-panel-close {
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 7px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    font-family: inherit;
    margin-top: 2px;
}
.odp-panel-close:hover { background: #e2e8f0; }

/* ── стиль самих инпутов ── */
input.odp-input {
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='1.4'%3E%3Crect x='1.5' y='2.8' width='13' height='11.5' rx='2'/%3E%3Cpath d='M1.5 6.5h13M5 1.5v3M11 1.5v3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px 15px;
    padding-right: 32px !important;
    user-select: none;
    caret-color: transparent;
}
input.odp-input::-webkit-calendar-picker-indicator { display: none !important; opacity: 0 !important; }
input.odp-input::-webkit-inner-spin-button { display: none !important; }
input.odp-input:focus { box-shadow: 0 0 0 3px rgba(0,156,77,.15); border-color: var(--primary, #009c4d) !important; outline: none; }

@media (max-width: 420px) {
    .odp-wrap { width: 100%; max-width: 360px; }
    .odp-header-val { font-size: 1.25rem; }
}
