/* A+ Ticket - Mobile-First Compact & Modern Theme */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 16px -2px rgba(0,0,0,0.08);
  --vip-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  --telebirr-color: #0072ce;
  --cbe-color: #871a8d;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem; /* Inter font compact typography */
  line-height: 1.45;
}

main {
  flex: 1;
}

h1, .h1 { font-size: 1.55rem; }
h2, .h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.02rem; }
h5, .h5 { font-size: 0.92rem; }
h6, .h6 { font-size: 0.84rem; }

/* Smaller buttons */
.btn {
  font-size: 0.81rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.btn-lg {
  font-size: 0.88rem;
  padding: 0.45rem 1.1rem;
}
.btn-sm {
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
}

/* Compact Forms & Inputs */
.form-control, .form-select, .input-group-text {
  font-size: 0.82rem;
  padding: 0.34rem 0.7rem;
  border-radius: var(--radius-sm);
}

/* Smaller Navbar Header */
.custom-nav {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.navbar-logo {
  height: 28px;
  width: auto;
  max-width: 95px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.06));
  transition: transform 0.15s ease;
}
.navbar-brand:hover .navbar-logo {
  transform: scale(1.03);
}

.navbar-brand-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}

/* Mobile App Back Arrow Bar */
.mobile-top-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.app-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.app-back-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
  transform: translateX(-2px);
}

/* Compact Horizontal Scrollable Categories */
.scroll-h-hide {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.scroll-h-hide::-webkit-scrollbar {
  display: none;
}

/* Event Info 3-Column Grid */
.event-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (max-width: 480px) {
  .event-info-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
}

.event-info-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

/* Ticket Tier Option Cards */
.ticket-tier-option {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  background: #ffffff;
}

.ticket-tier-option:hover {
  border-color: #cbd5e1;
  background: #fafafa;
}

.ticket-tier-option.active {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 1px var(--primary);
}

/* Ultra-Compact Quantity Selector */
.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  height: 28px;
}

.quantity-btn {
  background: #f8fafc;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: bold;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.quantity-btn:hover {
  background: #e2e8f0;
}

.quantity-input {
  width: 32px;
  height: 28px;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding: 0;
}
.quantity-input:focus { outline: none; }

/* Compact Event Carousel */
.event-carousel {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #0f172a;
}

.event-carousel .carousel-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .event-carousel .carousel-item img {
    height: 190px;
  }
}

.event-carousel .carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  text-align: left;
}

/* Sponsor Horizontal Marquee */
.sponsor-marquee-section {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

@keyframes marqueeSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  padding: 4px 0;
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1.8rem;
  min-width: 100%;
  animation: marqueeSlide 38s linear infinite;
}

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.marquee-item img {
  height: 38px;
  max-width: 85px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  opacity: 0.95;
  transition: all 0.2s ease;
}

.marquee-item:hover img {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

/* Compact Event Cards */
.event-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.event-card-img {
  height: 140px;
  object-fit: cover;
  width: 100%;
}

.event-badge-date {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  text-align: center;
  line-height: 1;
}
.event-badge-date .month { font-size: 0.65rem; }
.event-badge-date .day { font-size: 1rem; }

/* Ticket Pass Card */
.ticket-pass {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.ticket-header {
  background: linear-gradient(135deg, #312e81 0%, #2563eb 100%);
  color: #fff;
  padding: 14px;
}

.ticket-header.vip {
  background: var(--vip-gradient);
}

.ticket-divider {
  position: relative;
  height: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-divider::before, .ticket-divider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #f8fafc;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  z-index: 2;
}

.ticket-divider::before { left: -8px; }
.ticket-divider::after { right: -8px; }

.ticket-dashed-line {
  width: 100%;
  border-top: 2px dashed #cbd5e1;
}

.ticket-body {
  padding: 14px;
  background: #fff;
}

.qr-wrapper {
  background: #f8fafc;
  padding: 10px;
  border-radius: 10px;
  display: inline-block;
  border: 1px solid #e2e8f0;
}

/* Compact Payment Cards */
.payment-card {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-card:hover {
  border-color: var(--primary);
  background-color: #f8fafc;
}

.payment-card.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.payment-telebirr-icon {
  color: var(--telebirr-color);
  font-weight: 800;
  font-size: 0.9rem;
}

.payment-cbe-icon {
  color: var(--cbe-color);
  font-weight: 800;
  font-size: 0.9rem;
}

/* Compact Tables */
.table {
  font-size: 0.8rem;
}
.table > :not(caption) > * > * {
  padding: 0.45rem 0.55rem;
}

/* Compact Scanner */
#reader {
  width: 100% !important;
  border: none !important;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.scan-result-card {
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
}