/**
 * Helau Tickets - Shop Stylesheet
 */

:root {
  --ht-primary: #c1121f;
  --ht-primary-hover: #780000;
  --ht-accent: #ffb703;
  --ht-accent-gold: #fb8500;
  --ht-bg: #f8f9fa;
  --ht-card-bg: #ffffff;
  --ht-text: #212529;
  --ht-text-muted: #6c757d;
  --ht-border: #dee2e6;
  --ht-success: #198754;
  --ht-danger: #dc3545;
  --ht-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ht-sticky-header-height: 145px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ht-font);
  background-color: var(--ht-bg);
  color: var(--ht-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky Header Container (Fixierte Topbar & Toolbar darunter) */
.ht-sticky-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  background: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Header */
.ht-header {
  background: linear-gradient(135deg, #780000 0%, #c1121f 50%, #b0101b 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ht-header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ht-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ht-logo-badge {
  background: var(--ht-accent);
  color: #000;
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

.ht-title-group h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}

.ht-title-group p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
}

.ht-header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ht-btn-admin {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ht-btn-admin:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Event Switcher Tabs */
.ht-event-bar {
  background: white;
  border-bottom: 1px solid var(--ht-border);
  padding: 0.75rem 1.5rem;
}

.ht-event-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ht-event-tabs {
  display: flex;
  gap: 0.5rem;
}

.ht-event-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.5rem 1.1rem;
  background: #f1f3f5;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ht-event-tab:hover {
  background: #e9ecef;
}

.ht-event-tab.active {
  background: #fff;
  border-color: var(--ht-primary);
  box-shadow: 0 2px 8px rgba(193, 18, 31, 0.15);
}

.ht-tab-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ht-text);
}

.ht-event-tab.active .ht-tab-title {
  color: var(--ht-primary);
}

.ht-tab-subtitle {
  font-size: 0.78rem;
  color: var(--ht-text-muted);
}

.ht-event-info-pill {
  font-size: 0.85rem;
  background: #fff3cd;
  color: #664d03;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  border: 1px solid #ffe69c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Shop Layout */
.ht-main-content {
  max-width: 1400px;
  margin: 1.25rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  flex: 1;
  width: 100%;
}

@media (max-width: 1024px) {
  .ht-main-content {
    grid-template-columns: 1fr;
  }
}

/* Plan Card */
.ht-plan-card {
  background: var(--ht-card-bg);
  border-radius: 12px;
  border: 1px solid var(--ht-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ht-plan-header {
  padding: 0.85rem 1.25rem;
  background: #fafafa;
  border-bottom: 1px solid var(--ht-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ht-plan-title-wrapper h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.ht-plan-subtitle {
  font-size: 0.82rem;
  color: var(--ht-text-muted);
}

.ht-plan-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ht-ctrl-btn {
  background: white;
  border: 1px solid var(--ht-border);
  color: var(--ht-text);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.ht-ctrl-btn:hover {
  background: #f1f3f5;
  border-color: #ced4da;
}

/* Plan Canvas Area */
.ht-seating-container {
  position: relative;
  background: #ffffff;
  overflow: hidden;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ht-seating-svg {
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  display: block;
}

/* Legend */
.ht-legend-bar {
  padding: 0.75rem 1.25rem;
  background: #fafafa;
  border-top: 1px solid var(--ht-border);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.82rem;
}

.ht-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ht-legend-color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #333;
}

.ht-legend-color.color-free {
  background: #ffffff;
  border: 1.5px solid #2b2d42;
}

.ht-legend-color.color-selected {
  background: #10b981;
  border: 1.5px solid #047857;
}

.ht-legend-color.color-occupied {
  background: #ffb703;
  border: 1.5px solid #d48b00;
}

.ht-legend-color.color-crew {
  background: #90e0ef;
  border: 1.5px solid #0077b6;
}

.ht-legend-color.contour-normal {
  background: transparent;
  border: 2px solid #1a1a1a;
}

.ht-legend-color.contour-standing {
  background: transparent;
  border: 2.5px solid #d32f2f;
}

/* Sidebar Cart */
.ht-cart-card {
  background: var(--ht-card-bg);
  border-radius: 12px;
  border: 1px solid var(--ht-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--ht-sticky-header-height, 145px) + 1.25rem);
  max-height: calc(100vh - var(--ht-sticky-header-height, 145px) - 2.5rem);
}

.ht-cart-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ht-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ht-cart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.ht-cart-count-badge {
  background: var(--ht-primary);
  color: white;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-weight: 700;
}

.ht-cart-items-wrapper {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
  max-height: 380px;
}

.ht-cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ht-text-muted);
}

.ht-cart-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

.ht-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid #e9ecef;
  transition: background 0.15s ease;
}

.ht-cart-item:hover {
  background: #f1f3f5;
}

.ht-item-desc {
  display: flex;
  flex-direction: column;
}

.ht-item-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.ht-item-subtitle {
  font-size: 0.75rem;
  color: var(--ht-text-muted);
}

.ht-item-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ht-item-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ht-primary);
}

.ht-btn-remove {
  background: transparent;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
}

.ht-btn-remove:hover {
  color: var(--ht-danger);
  background: #fee2e2;
}

.ht-cart-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--ht-border);
  background: #fafafa;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.ht-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.ht-total-amount {
  color: var(--ht-primary);
}

.ht-btn-checkout {
  width: 100%;
  background: var(--ht-success);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.ht-btn-checkout:hover:not(:disabled) {
  background: #157347;
  transform: translateY(-1px);
}

.ht-btn-checkout:disabled {
  background: #6c757d;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal */
.ht-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.ht-modal-overlay.active {
  display: flex;
}

.ht-modal-dialog {
  background: white;
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.ht-modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--ht-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.ht-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.ht-modal-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ht-text-muted);
}

.ht-modal-body {
  padding: 1.5rem;
}

.ht-form-group {
  margin-bottom: 1rem;
}

.ht-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.ht-form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--ht-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.ht-form-control:focus {
  outline: none;
  border-color: var(--ht-primary);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.15);
}

.ht-modal-summary-box {
  background: #f8f9fa;
  border: 1px solid var(--ht-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.ht-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ht-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #fafafa;
}

.ht-btn-secondary {
  background: #e9ecef;
  color: var(--ht-text);
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.ht-btn-secondary:hover {
  background: #dee2e6;
}

.ht-btn-primary {
  background: var(--ht-primary);
  color: white;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ht-btn-primary:hover:not(:disabled) {
  background: var(--ht-primary-hover);
}

.ht-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success View */
.ht-success-icon {
  width: 60px;
  height: 60px;
  background: #d1e7dd;
  color: #0f5132;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;
}

.ht-success-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f5132;
  margin-bottom: 0.5rem;
}

.ht-booking-ref-badge {
  text-align: center;
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ht-primary);
  background: #ffe3e3;
  padding: 0.5rem;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Footer */
.ht-footer {
  margin-top: auto;
  background: #212529;
  color: #adb5bd;
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.85rem;
}

.ht-footer a {
  color: #f8f9fa;
  text-decoration: underline;
}
