/* ─────────────────────────────────────────────────────────────
   Minimal Time — companion to minimal-date. Same shell, same
   trigger treatment; only the panel contents differ.
   ───────────────────────────────────────────────────────────── */

.mt-wrap { display: contents; }
.mt-native { display: none !important; }

button:where(.mt-trigger) {
    padding: 0 calc(6px * var(--ui-scale, 1));
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: calc(6px * var(--ui-scale, 1));
    background: var(--surface-color, #ffffff);
    color: var(--text-primary, #333333);
    font-size: calc(12px * var(--ui-scale, 1));
}

.mt-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(5px * var(--ui-scale, 1));
    min-width: 0;
    font-family: inherit;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mt-trigger:focus-visible,
.mt-wrap.open .mt-trigger {
    outline: none;
    border-color: var(--primary-color, #2196f3);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.mt-trigger:disabled { opacity: 0.55; cursor: not-allowed; }

.mt-trigger-text {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mt-trigger-text.placeholder { color: var(--text-muted, #999999); }

.mt-trigger-icon {
    flex-shrink: 0;
    width: calc(12px * var(--ui-scale, 1));
    height: calc(12px * var(--ui-scale, 1));
    color: var(--text-muted, #999999);
}

.mt-wrap.open .mt-trigger-icon { color: var(--primary-color, #2196f3); }

/* ── Panel ─────────────────────────────────────────────────── */

.mt-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000001;
    padding: calc(8px * var(--ui-scale, 1));
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: calc(8px * var(--ui-scale, 1));
    box-shadow: 0 10px 28px rgba(15, 25, 35, 0.14), 0 2px 6px rgba(15, 25, 35, 0.07);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(calc(-4px * var(--ui-scale, 1)));
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
}

.mt-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s;
}

.mt-cols { display: flex; gap: calc(6px * var(--ui-scale, 1)); }

.mt-col { display: flex; flex-direction: column; min-width: 0; }

.mt-col-head {
    padding-bottom: calc(5px * var(--ui-scale, 1));
    font-size: calc(9.5px * var(--ui-scale, 1));
    font-weight: 600;
    color: var(--text-muted, #999999);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mt-list {
    width: calc(54px * var(--ui-scale, 1));
    max-height: calc(168px * var(--ui-scale, 1));
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: calc(2px * var(--ui-scale, 1));
    scrollbar-width: thin;
}

.mt-list::-webkit-scrollbar { width: 6px; }
.mt-list::-webkit-scrollbar-track { background: transparent; }
.mt-list::-webkit-scrollbar-thumb {
    background: var(--border-color, #e0e0e0);
    border-radius: 6px;
}

.mt-opt {
    padding: calc(5px * var(--ui-scale, 1)) 0;
    border: none;
    background: transparent;
    border-radius: calc(6px * var(--ui-scale, 1));
    font-family: inherit;
    font-size: calc(11.5px * var(--ui-scale, 1));
    color: var(--text-primary, #333333);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.mt-opt:hover { background: var(--surface-hover, #f0f2f5); }

.mt-opt.selected {
    background: var(--primary-color, #2196f3);
    color: #ffffff;
    font-weight: 600;
}

/* ── Footer shortcuts ──────────────────────────────────────── */

.mt-foot {
    display: flex;
    align-items: center;
    gap: calc(4px * var(--ui-scale, 1));
    margin-top: calc(8px * var(--ui-scale, 1));
    padding-top: calc(8px * var(--ui-scale, 1));
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.mt-foot button {
    flex: 1;
    padding: calc(4px * var(--ui-scale, 1)) 0;
    border: none;
    background: transparent;
    border-radius: calc(6px * var(--ui-scale, 1));
    font-family: inherit;
    font-size: calc(10.5px * var(--ui-scale, 1));
    font-weight: 500;
    color: var(--text-secondary, #666666);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.mt-foot button:hover {
    background: var(--surface-hover, #f0f2f5);
    color: var(--primary-color, #2196f3);
}

.mt-foot .mt-now { color: var(--primary-color, #2196f3); font-weight: 600; }

body.theme-dark .mt-panel {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.theme-dark .mt-opt.selected { background: #1d84d6; }

@media (prefers-reduced-motion: reduce) {
    .mt-trigger, .mt-panel, .mt-opt, .mt-foot button { transition: none; }
}
