/**
 * TONI.go - Tablet-optimiertes CSS
 * Optimiert für 8-Zoll-Tablets mit Touch-Bedienung
 */

:root {
  --rot: #c31924;
  --weiss: #fff;
  --grau: #f4f4f4;
  --dunkelgrau: #333;
  --hellgrau: #e0e0e0;
  --gruen: #4caf50;
  --blau: #2196f3;
  --orange: #ff9800;
}

/* RESET & BASICS */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 18px; }
body { 
  background: var(--grau); 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; 
  line-height: 1.6;
  color: var(--dunkelgrau);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* HEADER - Kompakte Branding-Zeile */
header {
  background: var(--rot);
  color: var(--weiss);
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: relative;
  z-index: 100;
}

header img {
  height: 50px;
  margin-bottom: 4px;
}

header h1 {
  font-size: 1.6rem;
  margin: 4px 0;
  font-weight: 700;
}

header p {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* NAVIGATION - Touch-freundlich (VERSTECKT - wird als Hamburger angezeigt) */
.nav {
  background: #fff;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  position: relative;
  z-index: 99;
}

.nav a {
  display: inline-block;
  padding: 14px 24px;
  background: var(--grau);
  color: var(--dunkelgrau);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  border: 2px solid transparent;
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav a:hover, .nav a:active {
  background: var(--rot);
  color: var(--weiss);
  transform: scale(1.05);
}

.nav a.active {
  background: var(--rot);
  color: var(--weiss);
  border-color: var(--rot);
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

/* CARDS - Inhaltsbereiche */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--rot);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--dunkelgrau);
}

/* BUTTONS - GROSS & TOUCH-FREUNDLICH */
.btn, .menu-btn, button[type="submit"], input[type="submit"] {
  display: inline-block;
  padding: 20px 30px !important;
  margin: 8px 0;
  background: var(--rot);
  color: var(--weiss) !important;
  border: none;
  border-radius: 12px;
  font-size: 1.3rem !important;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 8px rgba(195, 25, 36, 0.3);
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  touch-action: manipulation;
}

.btn:hover, .menu-btn:hover, button[type="submit"]:hover {
  background: #a01520;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(195, 25, 36, 0.4);
}

.btn:active, .menu-btn:active, button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(195, 25, 36, 0.3);
}

/* Button-Varianten */
.btn-secondary {
  background: var(--grau) !important;
  color: var(--dunkelgrau) !important;
  border: 2px solid var(--hellgrau);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--hellgrau) !important;
}

.btn-success {
  background: var(--gruen) !important;
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
}

.btn-info {
  background: var(--blau) !important;
  box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}

.btn-warning {
  background: var(--orange) !important;
  box-shadow: 0 3px 8px rgba(255, 152, 0, 0.3);
}

.btn-danger {
  background: #f44336 !important;
  box-shadow: 0 3px 8px rgba(244, 67, 54, 0.3);
}

.btn-small {
  padding: 12px 20px !important;
  font-size: 1rem !important;
  min-height: 50px;
}

/* FORMS - Große Eingabefelder */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 18px;
  margin: 10px 0;
  border: 2px solid var(--hellgrau);
  border-radius: 10px;
  font-size: 1.2rem;
  font-family: inherit;
  transition: all 0.2s;
  min-height: 60px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rot);
  box-shadow: 0 0 0 3px rgba(195, 25, 36, 0.1);
}

label {
  display: block;
  margin: 15px 0 5px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dunkelgrau);
}

/* TABELLEN - Lesbar auf Tablets */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 1.1rem;
}

table th {
  background: var(--rot);
  color: var(--weiss);
  padding: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 1.2rem;
}

table td {
  padding: 14px;
  border-bottom: 1px solid var(--hellgrau);
}

table tr:hover {
  background: #f9f9f9;
}

/* ALERTS & MESSAGES */
.ok, .success, .info, .error, .err, .warning {
  padding: 18px 20px;
  margin: 15px 0;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.ok, .success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 5px solid var(--gruen);
}

.info {
  background: #e3f2fd;
  color: #1565c0;
  border-left: 5px solid var(--blau);
}

.error, .err {
  background: #ffebee;
  color: #c62828;
  border-left: 5px solid #f44336;
}

.warning {
  background: #fff3e0;
  color: #e65100;
  border-left: 5px solid var(--orange);
}

/* GRID LAYOUTS - Responsive */
.grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, 1fr);
}

/* SITZPLAN - Spezial */
.seat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  margin: 20px 0;
}

.seat {
  padding: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seat:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.seat.occupied {
  background: #ffcdd2;
  border-color: #f44336;
  cursor: not-allowed;
}

.seat.selected {
  background: #c8e6c9;
  border-color: var(--gruen);
}

.seat.blocked {
  background: #bdbdbd;
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

/* WARENKORB / CART */
.cart {
  position: sticky;
  top: 200px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--hellgrau);
  font-size: 1.1rem;
}

.price {
  font-weight: 700;
  color: var(--rot);
  font-size: 1.2rem;
}

/* QR CODE DISPLAY */
.qr-display {
  text-align: center;
  padding: 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.qr-display img {
  max-width: 300px;
  width: 100%;
  height: auto;
}

/* UTILITY CLASSES */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 10px !important; }
.p-2 { padding: 20px !important; }

/* RESPONSIVE - Kleinere Tablets/Phones */
@media (max-width: 768px) {
  html { font-size: 16px; }
  
  /* Header MINIMAL für Handy - NUR LOGO! */
  header {
    padding: 4px 10px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: auto !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  }
  
  header img {
    display: block !important; /* Logo zeigen! */
    height: 35px !important; /* Klein und kompakt! */
    margin: 0 !important;
  }
  
  header h1 { 
    display: none !important; /* Text weg! */
  }
  
  header p {
    display: none !important; /* Text weg! */
  }
  
  /* Navigation MINIMAL für Handy */
  .nav {
    position: relative !important;
    top: 0 !important;
    padding: 3px 5px !important; /* Minimal! */
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 8px !important;
    box-shadow: none !important; /* Kein Schatten */
  }
  
  .nav a {
    padding: 6px 10px !important; /* Sehr klein! */
    font-size: 0.75rem !important; /* Sehr klein! */
    min-height: auto !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
  }
  
  /* Container kompakter */
  .container {
    margin: 10px auto !important;
    padding: 0 10px !important;
  }
  
  .card {
    padding: 15px !important;
    margin: 12px 0 !important;
    border-radius: 12px !important;
  }
  
  .card h2 {
    font-size: 1.3rem !important;
    margin-bottom: 12px !important;
  }
  
  /* Buttons kleiner */
  .btn, .menu-btn, button[type="submit"], input[type="submit"] {
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    min-height: 55px;
  }
  
  /* Forms kompakter */
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    padding: 14px;
    font-size: 1rem;
    min-height: 50px;
  }
  
  label {
    font-size: 1rem;
  }
  
  /* Grid einzeln */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  /* Tabellen kompakter */
  table {
    font-size: 0.95rem;
  }
  
  table th, table td {
    padding: 10px;
  }
  
  /* Cart nicht sticky */
  .cart {
    position: relative;
    top: 0;
  }
}

/* LANDSCAPE MODE - Optimierung */
@media (orientation: landscape) and (max-height: 600px) {
  header {
    position: relative;
  }
  
  .nav {
    position: relative;
    top: 0;
  }
  
  .cart {
    position: relative;
    top: 0;
  }
}

/* PRINT STYLES */
@media print {
  header, .nav, .btn, .menu-btn { display: none; }
  .card { box-shadow: none; page-break-inside: avoid; }
}






