:root{font-family:system-ui,Arial,sans-serif;color:#152d50;background:#f3f6fb}*{box-sizing:border-box}body{margin:0}header{background:#152d50;color:white;padding:20px 5%;display:flex;justify-content:space-between;align-items:center}header a{color:white}main{max-width:1150px;margin:32px auto;padding:0 20px}.card{background:white;border:1px solid #e1e7f0;border-radius:15px;padding:22px;margin-bottom:20px;box-shadow:0 3px 12px #132b4c0a}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:15px}input,select,textarea,button{padding:11px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}input,textarea,select{max-width:100%;width:100%;margin:5px 0 12px}button,.btn{display:inline-block;background:#1968c3;color:white;border:0;padding:11px 16px;text-decoration:none;border-radius:8px;cursor:pointer}.muted{color:#68768a}.seat{width:38px;height:38px;padding:0;background:#dbeafe;color:#152d50;border:1px solid #8cb7e7;position:absolute;font-size:11px;display:flex;align-items:center;justify-content:center;cursor:move}.seat.selected{background:#4ade80}.seat.blocked{background:#aab2bd}.stage{text-align:center;background:#152d50;color:white;padding:12px;border-radius:8px;margin-bottom:18px}.map{position:relative;height:500px;border:1px dashed #93a6bf;background:linear-gradient(90deg,#f8fafc 19px,transparent 20px),linear-gradient(#f8fafc 19px,transparent 20px);background-size:20px 20px;overflow:auto}.notice{padding:14px;background:#e7f5ed;border-radius:8px;margin-bottom:15px}

.event-image{display:block;width:100%;max-height:340px;object-fit:cover;border-radius:10px;margin-bottom:15px}.event-image-preview{max-width:360px;width:100%;border-radius:10px}

.seat.selected{background:#21865b!important;color:white!important;outline:2px solid #075d39;}

.password-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:4px 0 10px}
.password-tools input{flex:1 1 210px;min-width:0;margin:0}
.password-tool-button{width:auto;white-space:nowrap;padding:8px 10px;font-size:.85rem}

.event-search-field{display:block;margin:10px 0 12px}
.event-search-field input{max-width:540px}
[data-event-item][hidden]{display:none!important}

/* VVK-Ansicht: Verkauf priorisieren, Bestände und Historie rechts */
.outlet-page{max-width:1600px;width:calc(100% - 32px);margin:0 auto}
.outlet-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 12px}
.outlet-topbar h1{margin:0;font-size:clamp(1.3rem,2vw,1.85rem)}
.outlet-columns{display:grid;grid-template-columns:minmax(0,7fr) minmax(310px,3fr);gap:18px;align-items:start}
.outlet-columns>.outlet-sales-panel,.outlet-columns>.outlet-sidebar{min-width:0}
.outlet-sales-panel>.card,.outlet-sidebar>.card{margin-top:0;margin-bottom:14px}
.outlet-balances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
.outlet-balances>.card{min-width:0;margin:0;padding:14px}
.outlet-balances h2{font-size:clamp(1.1rem,1.6vw,1.55rem);margin:8px 0 0;overflow-wrap:anywhere}
.outlet-balances strong{font-size:.85rem}
.outlet-balances small{display:block;margin-top:5px}
.outlet-sidebar h2{font-size:1.13rem}
.outlet-sidebar table{font-size:.84rem}
.outlet-sidebar th,.outlet-sidebar td{padding:6px;overflow-wrap:anywhere}
.outlet-table-scroll{width:100%;overflow-x:auto}
.outlet-sidebar .event-search-field input{width:100%;max-width:100%}
.outlet-sales-panel .card>h2{margin-top:0}
@media(max-width:1000px){.outlet-columns{grid-template-columns:minmax(0,1fr)}.outlet-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.outlet-balances{grid-column:1/-1}.outlet-sidebar>.card{margin-bottom:0}}
@media(max-width:650px){.outlet-page{width:calc(100% - 20px)}.outlet-sidebar{display:block}.outlet-sidebar>.card{margin-bottom:12px}.outlet-balances{gap:8px}.outlet-balances>.card{padding:10px}}

/* VVK: Suchfeld in eigener Zeile, identische Breite wie andere Formularfelder */
.outlet-sales-panel label.event-search-field{display:block;width:100%;}
.outlet-sales-panel label.event-search-field input[type="search"]{display:block;width:100%;max-width:none;margin-top:5px;}

/* Admin: Veranstaltungssuche mit Zeilenumbruch und voller Formularbreite */
main label.event-search-field{display:block;width:100%;}
main label.event-search-field input[type="search"]{display:block;box-sizing:border-box;width:100%;max-width:none;margin-top:6px;}

/* 1.0.9.9: Nur Sitzplan im Shop und in Vorverkaufsstellen.
   Editor bleibt unverändert. Koordinaten bleiben unverändert. */
body:has(#reserveForm) .map .seat,
#outlet-seat-map .seat {
  box-sizing: border-box;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  padding: 0;
  margin: 0;
  border-radius: 2px;
  border-width: 1px;
  font-size: 9px;
  line-height: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
body:has(#reserveForm) .map .seat.blocked,
#outlet-seat-map .seat.blocked { cursor: not-allowed; }
body:has(#reserveForm) .map .seat.selected,
#outlet-seat-map .seat.selected { z-index: 2; }

/* 1.0.9.10: Koordinatenfläche bleibt auch auf Smartphones scrollbar.
   Absolute Sitzpositionen erzeugen allein keine Scrollbreite. */
body:has(#reserveForm) .map,
#outlet-seat-map {
  width: 100%;
  max-width: 100%;
  height: min(60vh, 520px);
  min-height: 320px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  position: relative;
}
body:has(#reserveForm) .map::before,
#outlet-seat-map::before {
  content: '';
  display: block;
  width: 2100px;
  height: 2100px;
  pointer-events: none;
}
body:has(#reserveForm) .map .seat,
#outlet-seat-map .seat { touch-action: manipulation; cursor: pointer; }

/* 1.0.10.1 – Shop und VVK: sichtbarer Ausschnitt und echte Scrollfläche. */
#public-seat-map,#outlet-seat-map{position:relative;overflow:auto;overscroll-behavior:contain;max-width:100%;-webkit-overflow-scrolling:touch;}
#public-seat-map::before,#outlet-seat-map::before{content:"";display:block;width:2100px;height:2100px;pointer-events:none;}
@media(max-width:700px){#public-seat-map,#outlet-seat-map{height:58vh;min-height:290px;max-height:530px;touch-action:pan-x pan-y;}
#public-seat-map .seat,#outlet-seat-map .seat{width:15px;height:15px;min-width:15px;min-height:15px;padding:0;font-size:9px;line-height:13px;touch-action:manipulation;}}

/* 1.0.10.2: kompakter sichtbarer Saalplan, nur Shop und VVK */
#public-seat-map,#outlet-seat-map{
  width:100%;max-width:100%;box-sizing:border-box;
  overflow:auto;position:relative;
  height:min(62vh,520px);min-height:270px;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
#public-seat-map::before,#outlet-seat-map::before{
  width:var(--seatmap-content-width,100%)!important;
  height:var(--seatmap-content-height,300px)!important;
  min-width:100%;pointer-events:none;
}
#public-seat-map .seat,#outlet-seat-map .seat{
  width:17px!important;height:17px!important;
  min-width:17px!important;min-height:17px!important;
  font-size:10px!important;line-height:15px!important;
}
@media(max-width:700px){
  #public-seat-map,#outlet-seat-map{height:56vh;min-height:260px;max-height:470px;}
}
