/* YallaBalagan Ticket Service - Styles */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --a11y-font-scale: 1;
  --a11y-line-height: 1.6;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: calc(16px * var(--a11y-font-scale));
  line-height: var(--a11y-line-height);
  color: var(--gray-800);
  background: var(--gray-50);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
}

nav a {
  margin-left: 1.5rem;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary);
}

/* Page Title */
.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Event Card */
.event-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.event-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--gray-200);
}

.event-content {
  padding: 1.25rem;
}

.event-date {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.event-description {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.event-price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

.event-location {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Event Detail Page */
.event-detail {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.event-hero-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: var(--gray-200);
}

.event-detail-content {
  padding: 2rem;
}

.event-detail-header {
  margin-bottom: 2rem;
}

.event-detail-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.event-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-icon {
  font-size: 1.25rem;
}

.event-description-full {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--gray-700);
  margin-bottom: 2rem;
  white-space: pre-wrap; /* Preserve line breaks and spaces */
}

.event-description-full p {
  margin-bottom: 1rem;
}

.event-description-full p:last-child {
  margin-bottom: 0;
}

.event-description-full strong,
.event-description-full b {
  font-weight: 600;
  color: var(--gray-900);
}

.event-description-full em,
.event-description-full i {
  font-style: italic;
}

.event-description-full u {
  text-decoration: underline;
}

.event-description-full a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s;
}

.event-description-full a:hover {
  color: var(--primary-dark);
}

.event-description-full br {
  display: block;
  content: "";
  margin-top: 0.5rem;
}

/* Tickets Section */
.tickets-section {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.tickets-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.ticket-types {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-type {
  background: white;
  padding: 1.25rem;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid var(--gray-200);
}

.ticket-type.sold-out {
  opacity: 0.5;
  pointer-events: none;
}

.ticket-info h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.ticket-available {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.ticket-price-section {
  text-align: right;
}

.ticket-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.ticket-currency {
  font-size: 1rem;
  color: var(--gray-600);
}

/* Location Info */
.location-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.location-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.location-image {
  width: 120px;
  height: 120px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: var(--gray-200);
}

.location-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.location-description {
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.location-address {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.parking-info {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.parking-info h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.parking-description {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  width: 100%;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
}

/* Checkout */
.checkout-container {
  max-width: 600px;
  margin: 0 auto;
}

.checkout-card {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.order-summary {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: bold;
  padding-top: 0.75rem;
  border-top: 2px solid var(--gray-300);
  margin-top: 0.75rem;
}

/* Alert */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Footer */
footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-hero-image {
    height: 250px;
  }

  .location-header {
    flex-direction: column;
  }

  .location-image {
    width: 100%;
    height: 200px;
  }
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  color: var(--gray-900);
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.cookie-consent-text a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-consent-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-consent-btn-accept {
  background: var(--primary);
  color: white;
}

.cookie-consent-btn-accept:hover {
  background: var(--primary-dark);
}

.cookie-consent-btn-decline {
  background: var(--gray-200);
  color: var(--gray-800);
}

.cookie-consent-btn-decline:hover {
  background: var(--gray-300);
}

@media (max-width: 768px) {
  .cookie-consent {
    padding: 1rem;
  }

  .cookie-consent-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-consent-text {
    min-width: 100%;
  }

  .cookie-consent-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-consent-btn {
    width: 100%;
  }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  z-index: 10002;
  transition: top 0.2s;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Ensure buttons have proper focus states */
button:focus,
.btn:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print styles - disable accessibility modifications */
@media print {
  html {
    --a11y-font-scale: 1 !important;
    --a11y-line-height: 1.6 !important;
  }

  body {
    font-family: serif !important;
    color: black !important;
    background: white !important;
  }

  .skip-link {
    display: none !important;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .event-card {
    transition: none;
  }

  .cookie-consent {
    transition: none;
  }
}
