/* =======================================================
   1️⃣ RESET & GLOBAL
====================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #0c0c0f;
  color: #f5f5f5;
  overflow-x: hidden;
}

/* =======================================================
   2️⃣ HERO SECTION
====================================================== */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Background slideshow */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: slideShow 18s infinite;
  z-index: 0;
}
@keyframes slideShow {
  0%   { background-image: url("img/bg-hero.jpg"); }
  33%  { background-image: url("img/bg-features.jpg"); }
  66%  { background-image: url("img/bg-overcooked.jpg"); }
  100% { background-image: url("img/bg-nba.jpg"); }
}

/* Overlay gelap */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}

/* Konten hero */
.hero-content {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: 2.8rem;
  color: #fff;
}
.hero h1 span {
  color: #00ffcc;
}

/* =======================================================
   3️⃣ BUTTON UTAMA
====================================================== */
.btn-primary {
  background: linear-gradient(135deg,#00ffcc,#0077ff);
  border: none;
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
  color: #0c0c0f;
  font-size: 1rem;
  transition: 0.2s;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,255,204,0.4);
}

/* =======================================================
   4️⃣ AVAILABILITY BOX
====================================================== */
.availability {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}

.availability.loading { color: #e6c300; }
.availability.available {
  background: #e9fff0;
  color: #198754;
}
.availability.unavailable {
  background: #ffe8e8;
  color: #e41e26;
}

/* Spinner animasi */
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid transparent;
  border-top-color: #e41e26;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======================================================
   FORM BOOKING — Senada dengan Popup Konfirmasi & Invoice
   ====================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  width: 100%;
  max-width: 440px;
  position: relative;
  text-align: center;
  color: #222;
  font-family: 'Poppins', sans-serif;
  animation: popIn 0.3s ease;
  overflow: hidden;
}

.form-group {
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

/* Garis gradien atas seperti invoice */
.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 85%;
  height: 5px;
  background: linear-gradient(90deg, #e41e26, #ff4c4c, #ff6b6b);
  transform: translateX(-50%);
  border-radius: 0 0 12px 12px;
}

/* Judul dan deskripsi */
.modal-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e41e26;
  margin-bottom: 8px;
}

.modal-content p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* Input dan Select */
.modal-content input,
.modal-content select {
  width: 100%;
  margin: 5px 0;
  padding: 11px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff9f9;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.modal-content input:focus,
.modal-content select:focus {
  border-color: #e41e26;
  box-shadow: 0 0 6px rgba(228,30,38,0.3);
  outline: none;
}

/* Pesan ketersediaan */
.availability {
  font-weight: 600;
  margin-top: 10px;
  font-size: 0.95rem;
  min-height: 22px;
}

.availability.available {
  color: #28a745;
}

.availability.unavailable {
  color: #dc3545;
}

/* Tombol */
.modal-content button {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg,#e41e26,#ff4c4c);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 15px rgba(228,30,38,0.35);
}

.modal-content button:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(228,30,38,0.45);
}

.modal-content button:disabled {
  background: #cfcfcf;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

/* Animasi */
@keyframes fadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(5px); }
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsif */
@media (max-width: 480px) {
  .modal-content {
    width: 92%;
    padding: 22px 18px;
  }
  .modal-content h3 {
    font-size: 1.35rem;
  }
}

/* =======================================================
   6️⃣ FOOTER
====================================================== */
.footer {
  text-align: center;
  padding: 20px;
  color: #888;
}

/* =======================================================
   7️⃣ MOBILE RESPONSIVE
====================================================== */
@media(max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .modal-content { padding: 20px; }
}

/* =======================================================
   8️⃣ INVOICE / STRUK POPUP
====================================================== */
/* ======================================================
   POPUP INVOICE / STRUK BOOKING — ELEGAN & MATCH DENGAN KONFIRMASI
   ====================================================== */
.invoice-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: auto;
  padding: 20px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.35s ease;
}

.invoice-box {
  background: #fff;
  border-radius: 18px;
  padding: 28px 22px;
  max-width: 430px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  font-family: 'Poppins', sans-serif;
  color: #222;
  animation: popIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Garis gradien di bagian atas popup */
.invoice-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80%;
  height: 4px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #28a745, #00b894, #00cec9);
  transform: translateX(-50%);
}

/* Header */
.invoice-box h3 {
  text-align: center;
  margin-bottom: 5px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #111111;
}

.invoice-warning {
  color: #e70909;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.invoice-print-date {
  color: #000000;
  font-family: 'Courier New', Courier, monospace;
  font: size 12px; ;
  text-align: center;
  text-transform: uppercase;
}

.invoice-box p {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

/* Garis pemisah */
.invoice-line {
  border-top: 1px dashed #a8a8a8;
  margin: 10px 0 5px;
}

/* Detail baris */
.invoice-row {
  display: grid;
  grid-template-columns: 130px 11px auto;
  margin: 6px 0;
  align-items: center;
}

.invoice-row .label {
  font-weight: 500;
  color: #444;
}
.invoice-row .colon {
  text-align: center;
  color: #777;
}
.invoice-row .value {
  font-weight: 600;
  color: #111;
}

/* Total */
.invoice-total {
  text-align: right;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  margin-top: 12px;
}
#invDistance {
  font-weight: 600;
  color: #e41e26; /* warna merah mirip header */
}

#invoiceMap {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
}

#promoCode {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ff2929;
  width: 60%;
  margin-right: 6px;
  font-size: 0.9rem;
}

#applyPromo {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg,#25D366, #20ba57);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.2s;
}

#applyPromo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}


/* ===========================
   TEKS TERBILANG DI INVOICE
   =========================== */
.invoice-terbilang {
  text-align: center;       /* Di tengah */
  font-style: italic;       /* Gaya miring elegan */
  font-size: 0.9em;         /* Sedikit lebih kecil dari teks utama */
  color: #444;              /* Warna abu lembut */
  margin-top: 4px;          /* Jarak atas dari total harga */
  margin-bottom: 8px;       /* Jarak bawah sebelum garis berikutnya */
}


/* Tombol */
.invoice-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}

.invoice-buttons button {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Tombol WhatsApp */
#confirmWA {
  background: linear-gradient(135deg, #25D366, #20ba57);
  color: #fff;
}
#confirmWA::before {
  content: "📱";
  font-size: 1.1rem;
}
#confirmWA:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, #20ba57, #1aa84c);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Tombol Edit Data */
#editData {
  background: linear-gradient(135deg, #000000, #333333);
  color: #fff;
}
#editData::before {
  content: "✏️";
  font-size: 1.1rem;
}
#editData:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, #1a1a1a, #444444);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Animasi */
@keyframes fadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(6px); }
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsif */
@media (max-width: 480px) {
  .invoice-box {
    width: 92%;
    padding: 22px 18px;
  }
  .invoice-box h3 {
    font-size: 1.2rem;
  }
  .invoice-row {
    grid-template-columns: 110px 10px auto;
  }
  .invoice-buttons button {
    font-size: 0.9rem;
    padding: 10px 0;
  }
}


/* =======================================================
   9️⃣ CETAK STYLE
====================================================== */
@media print {
  body * { visibility: hidden; }
  #invoicePopup, #invoicePopup * { visibility: visible; }
  #invoicePopup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
    padding: 0;
    background: #fff;
  }
  .invoice-buttons { display: none; }
}

/* =======================================================
   🔟 SUBMIT BUTTON HIDDEN
====================================================== */
#submitBtn { display: none; } /* tombol JS tetap bisa dipakai */
/* ======================================================
   POPUP KONFIRMASI (decision-popup)
   ====================================================== */
/* ======================================================
   POPUP KONFIRMASI — ELEGAN + EMOJI TOMBOL
   ====================================================== */
.decision-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.35s ease;
}

.decision-box {
  background: #ffffff;
  color: #222;
  width: 92%;
  max-width: 400px;
  border-radius: 20px;
  padding: 30px 24px 24px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  font-family: 'Poppins', sans-serif;
  animation: popIn 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Garis gradien lembut di atas popup */
.decision-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80%;
  height: 4px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #28a745, #00b894, #00cec9);
  transform: translateX(-50%);
}

.decision-box h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.decision-box p {
  font-size: 0.96rem;
  color: #333;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Tombol area */
.decision-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Gaya tombol umum */
.decision-btns button {
  min-width: 140px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Tombol hijau (YA / LANJUTKAN) */
#yesBtn {
  background: linear-gradient(135deg, #28a745, #00b894);
  color: #fff;
}
#yesBtn::before {
  content: "✅";
  font-size: 1.1rem;
}
#yesBtn:hover {
  background: linear-gradient(135deg, #23923e, #00997c);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Tombol merah (TIDAK / BATALKAN) */
#noBtn {
  background: linear-gradient(135deg, #dc3545, #b52d3a);
  color: #fff;
}
#noBtn::before {
  content: "❌";
  font-size: 1.1rem;
}
#noBtn:hover {
  background: linear-gradient(135deg, #c12d3c, #962732);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Animasi halus muncul popup */
@keyframes fadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(6px); }
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsif untuk layar kecil */
@media (max-width: 480px) {
  .decision-box {
    width: 90%;
    padding: 22px 18px;
  }
  .decision-box h3 {
    font-size: 1.1rem;
  }
  .decision-box p {
    font-size: 0.9rem;
  }
  .decision-btns button {
    min-width: 110px;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}
