/* Tischreservierung Zua Oidn Hex – ergänzt style.css / admin.css (nutzt deren Variablen) */

/* ---------- Gäste ---------- */
.rs-form { max-width: 40rem; }
.rs-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 560px) { .rs-three { grid-template-columns: 1fr; } }
.rs-small { color: var(--muted); font-size: .92rem; margin: 0; }
.rs-form h2 { margin: .8rem 0 0; font-size: 1.3rem; }
.rs-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.rs-slot { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .75rem .5rem; text-align: center; cursor: pointer; gap: .1rem; }
.rs-slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rs-slot span { font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; }
.rs-slot small { color: var(--sea); font-weight: 600; }
.rs-slot:has(input:checked) { border-color: var(--wine); box-shadow: inset 0 0 0 2px var(--wine); }
.rs-slot:has(input:focus-visible) { outline: 3px solid var(--sea); outline-offset: 2px; }
.rs-slot.off { opacity: .5; cursor: not-allowed; background: var(--paper); }
.rs-slot.off small { color: var(--muted); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Verwaltung ---------- */
.rs-inline { display: block; margin: 0; }
.rs-inline input { width: auto; }
.rs-daybar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.rs-daytitle { font-family: var(--font-display); font-size: 1.3rem; margin: 0 auto 0 .5rem; }
.rs-formcard { padding: 1rem 1.2rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; }
.rs-formcard h2 { margin-top: 0; }
.rs-timeline { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem 1rem; margin: 1rem 0 .5rem; }
.rs-row { display: grid; grid-template-columns: 6.5rem repeat(var(--cols), minmax(26px, 1fr)); min-width: 680px; margin: 3px 0; align-items: stretch; }
.rs-thead .rs-hour { grid-column: span 2; font-size: .8rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 4px; }
.rs-areahead { font-family: var(--font-display); font-weight: 700; color: var(--wine); margin: .9rem 0 .1rem; }
.rs-tname { grid-column: 1; grid-row: 1; font-weight: 700; padding: .35rem .4rem .35rem 0; }
.rs-tname small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; }
.rs-cell { grid-row: 1; min-height: 3.1rem; background: var(--paper); border-left: 1px solid #e1e3dc; }
.rs-cell:nth-child(2n+1) { border-left-color: var(--line); }
.rs-cell:hover, .rs-cell:active, .rs-cell:focus-visible { background: #e9dfe3; }
.rs-block { grid-row: 1; z-index: 2; margin: 3px 2px; padding: .3rem .5rem; border-radius: var(--radius); color: #fff; background: var(--sea); text-decoration: none; overflow: hidden; line-height: 1.2; font-size: .88rem; white-space: nowrap; text-overflow: ellipsis; }
.rs-block:hover { color: #fff; filter: brightness(1.1); }
.rs-block b { display: block; overflow: hidden; text-overflow: ellipsis; }
.rs-block span { font-size: .78rem; opacity: .9; }
.rs-block.web b::after { content: " · W"; opacity: .85; }
.rs-block.st-arrived { background: #2f7a4a; }
.rs-block.st-noshow { background: #8a1c1c; opacity: .8; }
.rs-item { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-left: 5px solid var(--sea); border-radius: var(--radius); background: #fff; padding: .7rem 1rem; margin: .5rem 0; }
.rs-item.st-arrived { border-left-color: #2f7a4a; }
.rs-item.st-noshow { border-left-color: #8a1c1c; }
.rs-main { display: grid; gap: .15rem; }
.rs-acts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.rs-badge { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem; font-size: .82rem; color: var(--muted); }
.rs-inactive { opacity: .55; }
.rs-delete { margin-top: 1.5rem; }
.rs-timeline .rs-cell, .rs-block { min-height: 3.1rem; }
@media (max-width: 720px) { .rs-daytitle { width: 100%; order: -1; } }

/* ---------- Kalender (Gäste) ---------- */
.rs-two { grid-template-columns: 1fr 1fr; }
.rs-cal { max-width: 26rem; margin: 0 0 2rem; }
.rs-calhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; font-family: var(--font-display); font-size: 1.2rem; }
.rs-calhead .rs-dis { opacity: .3; pointer-events: none; }
.rs-calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rs-wd { text-align: center; font-size: .8rem; color: var(--muted); font-weight: 700; padding-bottom: 2px; }
.rs-day { display: grid; place-items: center; aspect-ratio: 1; min-height: 2.6rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.rs-day.off { color: #aaa9ad; background: var(--paper); }
.rs-day.on { background: #fff; border: 1px solid var(--wine); color: var(--wine); }
.rs-day.on:hover { background: #f1e3e8; }
.rs-day.on.sel { background: var(--wine); color: #fff; }
.rs-day.on:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }

/* ---------- Kalender Sondertage (Verwaltung) ---------- */
.rs-acal { max-width: 30rem; margin: 1rem 0 2rem; }
.rs-acalgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rs-acell { aspect-ratio: 1; min-height: 2.8rem; border-radius: var(--radius); border: 1px solid var(--line); font: inherit; font-weight: 700; cursor: pointer; background: var(--paper); color: #888; padding: 0; }
.rs-acell.on { background: #fff; border-color: var(--sea); color: var(--sea); }
.rs-acell.blocked { background: #8a1c1c; border-color: #8a1c1c; color: #fff; }
.rs-acell.extra { background: var(--sea); border-color: var(--sea); color: #fff; }
.rs-acell:disabled { opacity: .35; cursor: default; }
.rs-acell:not(:disabled):hover { outline: 2px solid var(--wine); }
.rs-legend { font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.rs-sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; border: 1px solid var(--line); margin-right: .3rem; vertical-align: -1px; }
.rs-sw.on { background: #fff; border-color: var(--sea); }
.rs-sw.blocked { background: #8a1c1c; border-color: #8a1c1c; }
.rs-sw.extra { background: var(--sea); border-color: var(--sea); }
.rs-sw.off { background: var(--paper); }

/* ---------- Raumplan ---------- */
.rs-planbox { position: relative; aspect-ratio: 16 / 10; width: 100%; background-color: #fff; background-image: linear-gradient(#eceee8 1px, transparent 1px), linear-gradient(90deg, #eceee8 1px, transparent 1px); background-size: 5% 8%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1rem 0; touch-action: pan-y; }
.rs-tbl { position: absolute; display: grid; place-content: center; text-align: center; background: var(--sea); color: #fff; border-radius: 8px; line-height: 1.1; padding: 2px; text-decoration: none; user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); overflow: hidden; }
.rs-tbl.round { border-radius: 50%; }
.rs-tbl b { font-size: clamp(.62rem, 1.7vw, 1rem); overflow-wrap: anywhere; }
.rs-tbl small { font-size: clamp(.55rem, 1.3vw, .8rem); opacity: .85; }
.rs-tbl.internal { background: #5d5864; }
.rs-tbl.selected { outline: 3px solid var(--wine); outline-offset: 1px; }
.rs-tbl.drag { opacity: .8; z-index: 5; cursor: grabbing; }
.rs-tbl.saved { outline: 3px solid #2f7a4a; }
.rs-planbox .rs-tbl[data-id] { cursor: grab; }
.rs-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }
.rs-planforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; align-items: start; }
.rs-editcard { padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-width: none; }
.rs-editcard h2 { margin-top: 0; font-size: 1.15rem; }
/* Raumplan-Ansicht im Tagesplan (antippbar) */
.rs-tbl.free { background: #fff; color: var(--sea); border: 2px solid var(--sea); }
.rs-tbl.busy { background: var(--wine); }
.rs-tbl.arrived { background: #2f7a4a; }
.rs-tbl.soon { background: #b7791f; }
.rs-tbl.nobook { background: #ddd; color: #666; border: 2px dashed #999; }
.rs-viewbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1rem; }
.rs-viewbar form { display: flex; gap: .5rem; align-items: center; margin: 0; }
.rs-viewbar select { width: auto; }

/* Bereichsfarben im Plan-Editor */
.rs-tbl.a0 { background: var(--sea); }
.rs-tbl.a1 { background: var(--wine); }
.rs-tbl.a2 { background: #b7791f; }
.rs-tbl.a3 { background: #4a6fa5; }
.rs-tbl.internal { background: #5d5864; border: 2px dashed #fff; }
.rs-sw.a0 { background: var(--sea); } .rs-sw.a1 { background: var(--wine); } .rs-sw.a2 { background: #b7791f; } .rs-sw.a3 { background: #4a6fa5; } .rs-sw.internal { background: #5d5864; }
.rs-tbl small { display: block; }
.rs-tbl b { overflow-wrap: break-word; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }
.rs-arearow { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0; }
.rs-arearow input { flex: 1 1 8rem; width: auto; }
