/* Logihub date / time picker — compact, matches portal Inter + slate / blue-600 */

input[type="date"].lh-dt-bound,
input[type="time"].lh-dt-bound,
input[type="datetime-local"].lh-dt-bound {
    cursor: pointer;
    color-scheme: light;
}

input.lh-dt-bound::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}

input.lh-dt-bound::-webkit-inner-spin-button,
input.lh-dt-bound::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}

input.lh-dt-bound:focus {
    outline: none;
}

input.lh-dt-open {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 1px #60a5fa;
}

.lh-dt-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100048;
    background: rgba(15, 23, 42, 0.18);
}

.lh-dt-scrim.is-on {
    display: block;
}

.lh-dt-pop {
    position: fixed;
    z-index: 100050;
    width: 272px;
    padding: 8px 8px 6px;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
    font-family: Inter, sans-serif;
    color: #0f172a;
    user-select: none;
    touch-action: manipulation;
    overscroll-behavior: contain;
    transform-origin: top center;
    animation: lh-dt-in 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lh-dt-pop[hidden] {
    display: none !important;
}

.lh-dt-pop.lh-dt-flip {
    transform-origin: bottom center;
}

.lh-dt-pop.lh-dt-time-only {
    width: 220px;
}

@keyframes lh-dt-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.lh-dt-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.lh-dt-nav {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.12s ease;
}

.lh-dt-nav:hover {
    background: #e2e8f0;
}

.lh-dt-pills {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.lh-dt-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.lh-dt-pill:hover,
.lh-dt-pill.is-on {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.lh-dt-pill.lh-dt-title {
    cursor: default;
}

.lh-dt-pill.lh-dt-title:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #0f172a;
}

.lh-dt-caret {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid #2563eb;
    margin-top: 1px;
}

.lh-dt-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.lh-dt-week span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.lh-dt-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.lh-dt-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #0f172a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.lh-dt-day.in-month {
    background: #fff;
    border-color: #e2e8f0;
}

.lh-dt-day.out {
    color: #cbd5e1;
    font-weight: 500;
    background: transparent;
    border-color: transparent;
}

.lh-dt-day:not(:disabled):hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.lh-dt-day.is-today {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #2563eb;
}

.lh-dt-day.is-sel {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.lh-dt-day.is-sel.is-today {
    background: #2563eb;
    color: #fff;
}

.lh-dt-day:disabled {
    color: #e2e8f0;
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
}

.lh-dt-months,
.lh-dt-years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 214px;
}

.lh-dt-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #fff;
    color: #0f172a;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.lh-dt-opt:hover {
    background: #f8fafc;
}

.lh-dt-opt.is-sel {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.lh-dt-opt.is-now:not(.is-sel) {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #2563eb;
}

.lh-dt-time {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.lh-dt-time-row {
    align-items: center;
    gap: 8px;
}

.lh-dt-time-row > span:first-child {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.lh-dt-spin {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 26px;
    padding: 0 2px;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    background: #fff;
}

.lh-dt-spin strong {
    min-width: 1.6rem;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lh-dt-spin button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.lh-dt-spin button:hover {
    background: #e2e8f0;
}

.lh-dt-time-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lh-dt-time-col span {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: center;
}

.lh-dt-wheel {
    height: 132px;
    overflow-y: auto;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    background: #f8fafc;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.lh-dt-wheel::-webkit-scrollbar {
    width: 6px;
}

.lh-dt-wheel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.lh-dt-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    width: 100%;
}

.lh-dt-slot:hover {
    background: #fff;
}

.lh-dt-slot.is-sel {
    background: #2563eb;
    color: #fff;
}

.lh-dt-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
}

.lh-dt-link {
    height: 24px;
    padding: 0 6px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.lh-dt-link:hover {
    background: #eff6ff;
}

.lh-dt-link.muted {
    color: #64748b;
    margin-left: auto;
}

.lh-dt-link.muted:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.lh-dt-done {
    height: 24px;
    margin-left: auto;
    padding: 0 8px;
    border: 1px solid #1d4ed8;
    border-radius: 3px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.lh-dt-done:hover {
    background: #1d4ed8;
}

@media (max-width: 639px) {
    .lh-dt-pop {
        width: min(300px, calc(100vw - 24px));
        left: 50% !important;
        top: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%);
        transform-origin: center;
    }

    .lh-dt-pop.lh-dt-time-only {
        width: min(240px, calc(100vw - 24px));
    }

    .lh-dt-day {
        height: 36px;
    }
}

@media print {
    .lh-dt-pop,
    .lh-dt-scrim {
        display: none !important;
    }
}
