@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #002053;
  --primary-hover: #001538;
  --primary-light: #e6edf7;
  --primary-border: #ccd8eb;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Màu 4 hạng vé chuẩn theo sơ đồ thực tế */
  --tier-svip: #dc2626;   /* Đỏ SVIP */
  --tier-vip: #1d4ed8;    /* Xanh VIP 600k */
  --tier-gold: #d97706;   /* Vàng Gold 400k */
  --tier-titan: #7c3aed;  /* Tím Titan 200k */

  --selected-color: #16a34a; /* Xanh lá chọn ghế */
  --sold-color: #cbd5e1;     /* Xám ghế đã bán */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 32, 83, 0.06);
  --shadow-lg: 0 12px 30px rgba(0, 32, 83, 0.09);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */
.site-header {
  background-color: #ffffff;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

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

.logo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--primary);
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-hotline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #dc2626;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-hotline:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

.btn-zalo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0068ff;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 104, 255, 0.25);
}

.btn-zalo-link:hover {
  background: #0056d6;
  transform: translateY(-1px);
}

/* ================= HERO SECTION ================= */
.hero-section {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 32px 0 28px;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.event-tag {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--primary-border);
}

.event-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.event-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 20px;
}

.event-info-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 580px;
  width: 100%;
  margin: 14px auto 0;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

.info-item svg {
  flex-shrink: 0;
}

.info-item span {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-item strong {
  color: var(--primary);
  font-weight: 700;
}

/* ================= BẢNG GIÁ VÉ (LEGEND) ================= */
.tier-legend-section {
  padding: 10px 0 8px;
}

.tier-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tier-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.tier-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-badge {
  background-color: var(--tier-theme);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.tier-rows {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.tier-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

/* ================= WORKSPACE (MAP & SIDEBAR) ================= */
.booking-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  padding-bottom: 60px;
  align-items: start;
}

/* Sidebar đặt vé */
.booking-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: sticky;
  top: 85px;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selected-count-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.selected-seats-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 2px;
}

#empty-seats-msg {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 28px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
}

.selected-seat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.seat-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.seat-detail {
  flex-grow: 1;
}

.seat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.seat-price {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

.seat-tier-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-remove-seat {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-remove-seat:hover {
  color: #dc2626;
  background: #fee2e2;
}

.sidebar-summary {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.summary-row.total {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 10px;
}

.summary-row.total .price {
  font-size: 20px;
  color: var(--primary);
}

.btn-checkout {
  width: 100%;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.btn-checkout:disabled {
  background-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.sidebar-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.btn-text-action:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ================= MOBILE BOTTOM BAR ================= */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  z-index: 99;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.mobile-bottom-bar.visible {
  transform: translateY(0);
}

.mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-seat-count {
  font-size: 12px;
  color: var(--text-muted);
}

.mobile-total-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.btn-mobile-checkout {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
}

/* ================= FOOTER ================= */
.site-footer {
  background-color: #3a8404;
  color: #f0fdf4;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 40px 0 24px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 24px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.footer-col p {
  margin-bottom: 6px;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 18px;
  font-size: 12px;
  color: #dcfce7;
}

/* Toast */
#toast-container {
  position: fixed;
  top: 75px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  pointer-events: auto;
  background: #ffffff;
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  border-left: 4px solid var(--primary);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.25s ease;
  max-width: 340px;
}

.toast-msg.toast-warning {
  border-left-color: #d97706;
}

.toast-msg.toast-error {
  border-left-color: #dc2626;
}

.toast-msg.fade-out {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ================= FLOATING BOTTOM RIGHT WIDGETS (HOTLINE, ZALO, BACK TO TOP) ================= */
.floating-bottom-stack {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.floating-contact-btn {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.08);
}

.floating-btn-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.btn-float-hotline .floating-btn-inner {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-float-zalo .floating-btn-inner {
  background-color: #0068ff;
  padding: 8px;
}

.btn-float-zalo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.btn-float-backtop .floating-btn-inner {
  background-color: #1e293b;
  color: #ffffff;
}

.btn-float-backtop {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.btn-float-backtop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hiệu ứng nhấp nháy nhẹ (Gentle Pulse Ring) */
.pulse-ring {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.pulse-ring-blue {
  animation: pulseGentleBlue 2.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

.pulse-ring-red {
  animation: pulseGentleRed 2.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
  animation-delay: 1.2s;
}

@keyframes pulseGentleBlue {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7);
  }
  60% {
    transform: scale(1.15);
    box-shadow: 0 0 0 14px rgba(0, 104, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
  }
}

@keyframes pulseGentleRed {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  60% {
    transform: scale(1.15);
    box-shadow: 0 0 0 14px rgba(220, 38, 38, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.floating-tooltip {
  display: none;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  margin-right: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

@media (min-width: 769px) {
  .floating-contact-btn:hover .floating-tooltip {
    display: inline-block;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .booking-workspace {
    grid-template-columns: 1fr;
  }
  .booking-sidebar {
    display: none;
  }
  .mobile-bottom-bar {
    display: block;
  }
  .tier-legend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= MOBILE OPTIMIZATIONS (<= 768px) ================= */
@media (max-width: 768px) {
  /* Xóa 2 nút ở Header Top trên mobile theo yêu cầu */
  .site-header .header-actions {
    display: none !important;
  }

  .site-header {
    background-color: #ffffff !important;
    padding: 8px 0;
  }

  .header-inner {
    justify-content: center;
  }

  .site-header {
    padding: 6px 0 !important;
  }

  .logo-brand {
    justify-content: flex-start;
    gap: 6px;
    max-width: 100%;
  }

  .logo-img {
    height: 32px;
    flex-shrink: 0;
  }

  .brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Tên công ty trên mobile: 1 dòng thanh thoát */
  .brand-text h1 {
    font-size: clamp(8px, 2.5vw, 10.5px);
    font-weight: 800;
    white-space: nowrap !important;
    letter-spacing: -0.2px;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Slogan trên mobile: Dịch vụ tận tâm - Nâng tầm trải nghiệm */
  .brand-text span {
    display: block !important;
    font-size: 8px;
    letter-spacing: 0.2px;
    white-space: nowrap !important;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.2;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Nút floating ở góc dưới bên phải */
  .floating-bottom-stack {
    right: 12px;
    bottom: 20px;
    gap: 10px;
    z-index: 9999;
  }

  .floating-btn-inner,
  .pulse-ring {
    width: 44px;
    height: 44px;
  }

  /* Hero section gọn gàng trên mobile */
  .hero-section {
    padding: 10px 0 8px;
  }

  .event-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  /* Căn trái, căn rộng ra để text 1 dòng */
  .event-info-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 6px auto 0;
  }

  .info-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 6px 10px;
    font-size: 11.5px;
    box-sizing: border-box;
    border-radius: 6px;
    white-space: nowrap;
  }

  .info-item span {
    text-align: left;
    white-space: nowrap;
  }

  /* Bảng giá vé gọn gàng - Thu gọn về 1 hàng 4 cột siêu mỏng để tối đa chiều cao cho bản đồ */
  .tier-legend-section {
    padding: 6px 0 4px;
  }

  .tier-legend-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .tier-card {
    padding: 5px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .tier-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 100%;
  }

  .tier-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 3px;
    line-height: 1.1;
  }

  .tier-rows {
    font-size: 8px;
    line-height: 1.1;
    color: var(--text-muted);
    white-space: nowrap;
  }

  .tier-price {
    font-size: 11px;
    font-weight: 800;
    margin-top: 1px;
    line-height: 1.1;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .brand-text h1 {
    font-size: 8.5px;
    letter-spacing: -0.4px;
  }
  .info-item {
    font-size: 10.5px;
    padding: 5px 8px;
  }
  .tier-price {
    font-size: 10px;
  }
}

