/* DriveZone Servisník – otevírací doba (1.3.5) */

/* Stav: Otevřeno / Zavřeno + dnešní čas */
.dzs-oh { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; line-height: 1.3; }
.dzs-oh-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.dzs-oh-open   { background: rgba(22,163,74,.12); color: #15803d; }
.dzs-oh-closed { background: rgba(220,38,38,.10); color: #b91c1c; }
.dzs-oh-today  { color: #666; }
.dzs-oh-compact { font-size: 12px; gap: 5px; }
.dzs-oh-compact .dzs-oh-badge { font-size: 10px; padding: 1px 7px; }
html.dark .dzs-oh-open, body.dark .dzs-oh-open, [data-theme="dark"] .dzs-oh-open { background: rgba(34,197,94,.18); color: #4ade80; }
html.dark .dzs-oh-closed, body.dark .dzs-oh-closed, [data-theme="dark"] .dzs-oh-closed { background: rgba(248,113,113,.16); color: #f87171; }
html.dark .dzs-oh-today, body.dark .dzs-oh-today, [data-theme="dark"] .dzs-oh-today { color: #aaa; }

/* Týden na detailu */
.dzs-oh-block { margin: 0 0 14px; }
.dzs-oh-block summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.dzs-oh-block summary::-webkit-details-marker { display: none; }
.dzs-oh-block summary .dzs-oh-chevron { transition: transform .15s; color: #888; }
.dzs-oh-block[open] summary .dzs-oh-chevron { transform: rotate(180deg); }
/* Šablona (Astra) dává tabulkám rámeček a šířku 100 % – tady nechceme ani jedno */
table.dzs-oh-week, .dzs-oh-block table.dzs-oh-week {
    width: auto !important; min-width: 0 !important; margin: 6px 0 0 !important;
    border: 0 !important; border-collapse: collapse !important; border-spacing: 0 !important;
    background: none !important; box-shadow: none !important; font-size: 13px; table-layout: auto;
}
table.dzs-oh-week tr, table.dzs-oh-week td, table.dzs-oh-week tbody {
    border: 0 !important; background: none !important; box-shadow: none !important;
}
table.dzs-oh-week td { padding: 2px 0 !important; vertical-align: top; white-space: nowrap; width: auto !important; }
table.dzs-oh-week td:first-child { padding-right: 20px !important; min-width: 80px; }
.dzs-oh-week td:last-child { font-variant-numeric: tabular-nums; }
.dzs-oh-week-today td { font-weight: 700; }

/* Editor (formulář přidání / úpravy a admin) */
.dzs-oh-editor { font-size: 14px; }
.dzs-oh-editor .dzs-oh-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; margin: 0; user-select: none; }
.dzs-oh-editor .dzs-oh-switch { position: relative; }
.dzs-oh-switch input { position: absolute; left: 0; top: 0; opacity: 0; width: 1px; height: 1px; margin: 0; }
.dzs-oh-switch-ui { position: relative; width: 36px; height: 20px; border-radius: 20px; background: #cfd4dc; transition: background .15s; flex-shrink: 0; }
.dzs-oh-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.dzs-oh-switch input:checked + .dzs-oh-switch-ui { background: #0088ff; }
.dzs-oh-switch input:checked + .dzs-oh-switch-ui::after { transform: translateX(16px); }
.dzs-oh-switch input:focus-visible + .dzs-oh-switch-ui { outline: 2px solid #0088ff; outline-offset: 2px; }
.dzs-oh-body { margin-top: 10px; padding: 12px; border: 1px solid #e2e5ea; border-radius: 10px; }
.dzs-oh-body[hidden], .dzs-oh-days[hidden], .dzs-oh-times[hidden], .dzs-oh-closed-label[hidden] { display: none !important; }
.dzs-oh-editor .dzs-oh-check { display: inline-flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 400 !important; font-size: 14px; margin: 0 !important; }
.dzs-oh-check input { margin: 0 !important; accent-color: #0088ff; width: 16px; height: 16px; }
.dzs-oh-days { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dzs-oh-row { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.dzs-oh-editor .dzs-oh-dayname { width: 104px; flex-shrink: 0; }
.dzs-oh-times { display: inline-flex; align-items: center; gap: 6px; }
.dzs-oh-times input[type=text] { width: 64px !important; padding: 6px 4px !important; text-align: center; font-variant-numeric: tabular-nums; border: 1px solid #d5d9e0; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.dzs-oh-times input.dzs-oh-bad { border-color: #dc2626 !important; }
.dzs-oh-closed-label { color: #999; font-size: 13px; }
.dzs-oh-copy { align-self: flex-start; margin-top: 4px; background: none !important; border: 0 !important; padding: 2px 0 !important; color: #0088ff !important; font-size: 13px !important; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dzs-oh-hint { margin: 2px 0 0 !important; font-size: 12px; color: #888; }

html.dark .dzs-oh-body, body.dark .dzs-oh-body, [data-theme="dark"] .dzs-oh-body { border-color: #3a3d44; }
html.dark .dzs-oh-times input[type=text], body.dark .dzs-oh-times input[type=text], [data-theme="dark"] .dzs-oh-times input[type=text] { background: #2b2e33; color: #e8e8e8; border-color: #3a3d44; }
html.dark .dzs-oh-switch-ui, body.dark .dzs-oh-switch-ui, [data-theme="dark"] .dzs-oh-switch-ui { background: #4a4e57; }

@media (max-width: 480px) {
    .dzs-oh-editor .dzs-oh-dayname { width: 92px; }
    .dzs-oh-times input[type=text] { width: 58px !important; }
}
