/* user.css - Base styling for user-facing pages */

:root {
  --primary-color: #b342f4;
  --secondary-color: #4b4bff;
  --accent-color: rgb(255, 255, 255);
  --dark-color: #333;
  --light-gray: #f5f5f5;
  --medium-gray: rgba(163, 163, 163, 0.91);
  --white: #ffffff;
  --red: rgb(53, 17, 17);
  --success: #4CAF50;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin-top: 20px;
  padding: 0;
  background-color: var(--light-gray);
  color: var(--dark-color);
  line-height: 1.6;
}

.main-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 5px;
  box-sizing: border-box;
}
/* ================================
   Basis-Styles für Event-Details
   ================================ */


/* Banner */
.banner {
  width: 100%;
  height: clamp(160px, 30vh, 300px);
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  margin: 40px 0 0 0;
}

/* Event-Kopfbereich */
.event-header {
  background: #333333;
  color: var(--dark-color);
  border-radius: 0 0 12px 12px;
  padding: 15px;
  text-align: center;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-title {
  color: rgb(255, 255, 255);
  font-size: clamp(30px, 5vw, 40px);
  margin: 2px 0;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
}

.event-venue {
  font-size: clamp(16px, 3vw, 24px);
  margin: 2px 0;
  color: #aaaaaa;
}

/* Event-Beschreibung */
.event-description {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.event-description h3 {
  color: rgba(67, 67, 67, 0.73);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  margin-top: 0;
  margin-bottom: 15px;
}

.event-description p {
  color: #252525;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.5;

}

/* Ticket-Bereich */
.ticket-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0;
  flex-wrap: wrap;
}

.price-display {
  font-size: 1.2em;
  margin: 10px 0;
}

.price-type {
  background-color: #4caf50;
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.8em;
  margin-left: 5px;
}

.original-price {
  text-decoration: line-through;
  opacity: 0.7;
  font-size: 0.85em;
  margin-left: 5px;
}

.ticket-amount {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-amount select {
  padding: 8px;
  width: auto;
}

#ticket-list {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ticket-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
  align-items: center;
}

.ticket-row label {
  font-weight: bold;
  width: 15%;
  margin-bottom: 8px;
}

.ticket-row input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  margin-right: 10px;
  padding: 10px;
}

.ticket-row input:last-child {
  margin-right: 0;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 20px 0;
}

.actions button {
  width: auto;
  padding: 12px 24px;
}

/* Fehlermeldungen */
.error-container {
  background-color: rgba(255, 0, 0, 0.04);
  border-left: 4px solid var(--red);
  padding: 10px 15px;
  border-radius: 4px;
  margin: 15px 0;
}


/* ======================
   Zeit- und PlusPic-Layout (Neu)
   ====================== */

/* Hauptcontainer für Event-Informationen */
.event-info-section {
  background: transparent;
  border-radius: 12px;
  padding: 0px;
  margin: 15px 0;
}

.event-info-content {
  display: flex;
  gap: 15px;
  align-items: stretch;
}

/* Zeit-Container */
.time-display-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-card {
  background: rgb(255, 255, 255);
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
}

.time-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.time-icon {
  width: 80px;
  height: 32px;
  border-radius: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
}

.time-icon.start {
  background: linear-gradient(135deg, #b3eca1, #437a32);
}

.time-icon.end {
  background: linear-gradient(135deg, #812e2e, #e13636);
}

.time-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 2;
}

.date-display {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  flex: 1;
  text-align: center;
}

.time-display {
  font-size: 14px;
  font-weight: 500;
  color: #7f8c8d;
  background: #ecf0f1;
  padding: 4px 10px;
  border-radius: 15px;

}

/* PlusPic Container - quadratisch, Höhe = beide Karten + Gap */
.pluspic-enhanced-container {
  flex-shrink: 0;
  width: 157px; /* Vergrößert von 110px auf 157px */
  height: 157px; /* Vergrößert von 110px auf 157px */
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pluspic-enhanced-container:hover {
  transform: scale(1.03);
}

.pluspic-frame {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.pluspic-enhanced-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center left; /* Zeigt oberen Teil des Bildes bei allen Größen */
  transition: transform 0.3s ease;
}

.pluspic-enhanced-container:hover .pluspic-enhanced-img {
  transform: scale(1.05);
}

.pluspic-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pluspic-enhanced-container:hover .pluspic-overlay {
  opacity: 1;
}

.mobile-divider {
    display: none;
}

/* Responsive Anpassungen */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Tablet: wie Desktop-Display */
  .event-info-content {
    flex-direction: row;
    gap: 15px;
    align-items: stretch;
  }

  .pluspic-enhanced-container {
    width: 157px;
    height: 157px;
  }

  .pluspic-enhanced-img {
    object-position: center left;
  }

  .mobile-divider {
    display: none;
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  /* Tablet: Horizontales Layout beibehalten */
  .event-info-content {
    flex-direction: row;
    gap: 15px;
    align-items: stretch;
  }

  .event-info-section {
    padding: 0px;
  }

  .time-card {
    padding: 10px 12px;
    min-height: 45px;
  }

  .time-icon {
    width: 70px;
    height: 28px;
    font-size: 12px;
  }

  .date-display {
    font-size: 14px;
  }

  .time-display {
    font-size: 12px;
    padding: 3px 8px;
  }

  /* PlusPic auf Tablets: gleiche Größe wie Desktop */
  .pluspic-enhanced-container {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
  }

  .pluspic-enhanced-img {
    object-position: center left;
  }

  .mobile-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Smartphone: Vertikales Layout mit doppelter PlusPic-Höhe */
  .event-info-content {
    flex-direction: column;
    gap: 12px;
  }

  .event-info-section {
    padding: 10px;
    margin: 15px 0;
  }

  /* Mobile: Kompakte Karten-Darstellung mit Höhe für Symbol, Datum und Zeit */
  .time-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    min-height: 40px;
  }

  .time-content {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .time-icon {
    width: 60px;
    height: 24px;
    font-size: 10px;
  }

  .date-display {
    font-size: 13px;
    flex: 1;
  }

  .time-display {
    font-size: 11px;
    padding: 2px 6px;
  }

  /* PlusPic mobile: doppelte Höhe */
  .pluspic-enhanced-container {
    width: 100%;
    height: 180px; /* Verdoppelt von 90px auf 180px */
    align-self: auto;
  }

  .pluspic-enhanced-img {
    object-position: center;
    object-fit: scale-down; /* Skaliert das Bild, wenn es größer als der Container ist */
  }
}


/* ================
   MODAL-STYLES
   ================ */

/* -- PlusPic-Modal (vergrößertes Bild) -- */
#pluspicModal.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

#pluspicModal .modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
}

#pluspicModal .modal-img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

#pluspicModal .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}


/* -- Terms-Modal (AGB / Nutzungsbedingungen) -- */
#termsModal.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

#termsModal .modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  width: 70%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#termsModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

#termsModal .modal-header h2 {
  margin: 0;
  color: var(--dark-color);
}

#termsModal .close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#termsModal .modal-body {
  padding: 20px;
  max-height: 50vh;
  overflow-y: auto;
}

#termsModal .special-conditions {
  background-color: rgba(131, 131, 131, 0.38);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

#termsModal .modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
}

#termsModal .modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#termsModal .checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

#termsModal .checkbox-container input[type="checkbox"] {
  margin-right: 6px;
  min-width: 16px;
  max-width: 20%;
}

#termsModal .checkbox-container label {
  line-height: 1.3;
  width: 80%;
}

#termsModal #okButton[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


/* =============================
   RESPONSIVE ADJUSTMENTS
   ============================= */



@media (max-width: 767px) {
  /* Tickets: Anpassungen für Mobil - vertikale Anordnung */
  .ticket-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-row label {
    width: 100%;
    margin-bottom: 8px;
    margin-right: 0;
  }

  .ticket-row input {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .ticket-row input:last-child {
    margin-bottom: 0;
  }

  .actions {
  justify-content: center;
  flex-wrap: wrap;
  }
}

/* Zusätzliche Regel für sehr schmale Bildschirme */
@media (max-width: 480px) {


  #ticket-list {
    padding: 10px;
  }

  .ticket-row {
    margin-bottom: 20px;
  }

  .ticket-row input {
    padding: 12px;
    font-size: 16px; /* verhindert Zoom auf iOS */
  }

  /* Divider zwischen Zeitkarten und PlusPic für mobile Ansicht */
  .mobile-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: #dddddd;
    border: none;
    margin: 10px 0;
  }
}

/* Banner and headers */

.page-title {
  text-align: center;
  margin: 20px 0;
  font-size: clamp(24px, 5vw, 36px);
  color: var(--dark-color);
}

/* Event display components */







#ticket-list {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}







.actions button {
  width: auto;
  padding: 12px 24px;
}

/* Forms and inputs */
input, select, button, textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #9533d6;
}

button.secondary {
  background-color: #f1f1f1;
  color: var(--dark-color);
}

button.secondary:hover {
  background-color: #ddd;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

tr:last-child td {
  border-bottom: none;
}

/* Card styles */
.card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

.success-message {
  background-color: white;
  color: var(--success);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

.error-message {
  background-color: white;
  color: var(--red);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

/* Event tiles for landing page */
.event-listing {
  display: grid;
  grid-template-columns: 2fr;
  gap: 20px;
  padding-top: 20px;
}


.event-tile {
  position: relative;
  height: 225px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s
}

.event-tile:hover {
  transform: scale(1.07);
}

.event-tile-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
}

/* Preis-Badge */
.price-type-badge {
  position: absolute;
  top: 50px;
  right: 20px;
  background-color: #4caf50;
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.6em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 1;
}

.event-dates {
  position: relative;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,0.8);
  color: var(--accent-color);
  padding: 10px 10px;
  font-family: "Avenir Next", sans-serif;
  font-size: clamp(10px, 4vw, 13px);
  line-height: 1.4;
  width: 110px;
  height: 70px;
  box-sizing: border-box;
  border-radius: 0 0 50px 0;
}

.weekday {
    font-weight: bold;
    color: #e44343;
    font-size: 0.9em;
}

.event-name {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: rgba(255,255,255,0.85);
  color: var(--dark-color);
  padding: 15px;
  width: fit-content;
  min-width: 65%;
  min-height: 20%;
  max-width: 80%;
  max-height: 45%;
  border-radius: 20px 0 0 0;
  font-family: Impact, sans-serif;
  font-size: clamp(16px, 4vw, 28px);
  text-transform: uppercase;
  text-align: center;
  overflow: visible;
  box-sizing: border-box;
  line-height: 0.9;
}

.ticket-cta {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}

.ticket-null {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #FB8C00;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}

.ticket-sale-end {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--red);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 10px;
  transition: transform 0.2s;
}



/* Ticket download section */
.download-list {
  list-style: none;
  padding: 0;
}

.download-item {
  background-color: white;
  margin-bottom: 10px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}

.download-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  width: 100%;
}

.download-link:hover {
  text-decoration: underline;
}

.download-link:before {
  content: "📄";
  margin-right: 10px;
  font-size: 20px;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .event-listing {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
  }

  /* Target the <a> elements which are the actual children of event-listing */
  .event-listing > a:nth-child(1) {
    grid-column: 1 / span 9 !important; /* 100% width */
  }

  /* Row 1 (items 2-3) */
  .event-listing > a:nth-child(2) {
    grid-column: 1 / span 5 !important; /* 60% width */
  }
  .event-listing > a:nth-child(3) {
    grid-column: 6 / span 4 !important; /* 40% width */
  }

  /* Row 2 (items 4-5) */
  .event-listing > a:nth-child(4) {
    grid-column: 1 / span 4 !important; /* 40% width */
  }
  .event-listing > a:nth-child(5) {
    grid-column: 5 / span 5 !important; /* 60% width */
  }

  /* Row 3 (items 6-7) */
  .event-listing > a:nth-child(6) {
    grid-column: 1 / span 5 !important; /* 60% width */
  }
  .event-listing > a:nth-child(7) {
    grid-column: 6 / span 4 !important; /* 40% width */
  }

  /* Row 4 (items 8-9) */
  .event-listing > a:nth-child(8) {
    grid-column: 1 / span 4 !important; /* 40% width */
  }
  .event-listing > a:nth-child(9) {
    grid-column: 5 / span 5 !important; /* 60% width */
  }

  /* Row 5 (items 10-12) */
  .event-listing > a:nth-child(10) {
    grid-column: 1 / span 3 !important; /* 33% width */
  }
  .event-listing > a:nth-child(11) {
    grid-column: 4 / span 3 !important; /* 33% width */
  }
  .event-listing > a:nth-child(12) {
    grid-column: 7 / span 3 !important; /* 33% width */
  }

  /* All subsequent rows (items 13+) */
.event-listing > a:nth-child(3n+13) {
  grid-column: 1 / span 3 !important; /* 33% width */
}
.event-listing > a:nth-child(3n+14) {
  grid-column: 4 / span 3 !important; /* 33% width */
}
.event-listing > a:nth-child(3n+15) {
  grid-column: 7 / span 3 !important; /* 33% width */
}


  .event-time-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .time-box {
    width: 49%;
  }

  .form-row {
    display: flex;
    gap: 20px;
  }

  .form-group {
    flex: 1;
  }

  .button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .button-group button {
    width: auto;
  }
}