/* ============================================================
   AirGari – Shared CSS (main.css)
   Used across all 15 pages.
   Only styles that cannot be expressed with plain Tailwind
   utility classes live here (pseudo-elements, complex hover
   transitions, state classes toggled by JavaScript, etc.)
   ============================================================ */

/* -----------------------------------------------------------
   Base / Reset
   ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* -----------------------------------------------------------
   Font
   ----------------------------------------------------------- */
body { font-family: 'Poppins', sans-serif; }

/* -----------------------------------------------------------
   PUBLIC NAV – animated underline on hover (requires ::after)
   ----------------------------------------------------------- */
.nav-link-custom {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link-custom::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background-color: #2F4B7C;
  transition: width 0.3s ease;
}
.nav-link-custom:hover { color: #2F4B7C; }
.nav-link-custom:hover::after { width: 100%; }

/* -----------------------------------------------------------
   PUBLIC BUTTONS  (used on index / login / signup)
   ----------------------------------------------------------- */
.btn-primary-custom {
  background-color: #2F4B7C;
  color: #fff;
  border-radius: 999px;
  padding: 10px 24px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}
.btn-primary-custom:hover {
  background-color: #23395d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(47,75,124,0.25);
}

.btn-outline-custom {
  border: 2px solid #2F4B7C;
  color: #2F4B7C;
  border-radius: 999px;
  padding: 10px 24px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}
.btn-outline-custom:hover {
  background-color: #2F4B7C;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(47,75,124,0.25);
}

/* -----------------------------------------------------------
   DASHBOARD NAV – dropdown (CSS hover reveal)
   ----------------------------------------------------------- */
.dropdown { position: relative; }

.dropdown-menu-custom {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateX(-50%);
  background-color: #f5a351;
  border-radius: 12px;
  display: none;
  min-width: 290px;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1000;
  text-align: left;
}
.dropdown-menu-custom a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}
.dropdown-menu-custom a:hover {
  background: rgba(255,255,255,0.2);
}
.dropdown:hover .dropdown-menu-custom { display: block; }

@media (max-width: 768px) {
  .dropdown-menu-custom {
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    max-width: 92vw;
  }
}

/* -----------------------------------------------------------
   DASHBOARD NAV MENU links
   ----------------------------------------------------------- */
.nav-menu a { transition: color 0.2s ease; }
.nav-menu a:hover { color: #2f4b7c; }

/* -----------------------------------------------------------
   MOBILE MENU  (toggled by JS  .active class)
   ----------------------------------------------------------- */
.mobile-menu {
  display: none;
  background: #F7941D;
  color: #2f4b7c;
  padding: 15px;
  position: absolute;
  top: 70px;
  width: 100%;
  left: 0;
  z-index: 99999;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}
.mobile-menu.active { display: block; }

.mobile-sub { display: none; padding-left: 15px; }
.mobile-sub a {
  display: block;
  padding: 6px 0;
  color: #f3f3f3;
  text-decoration: none;
}

/* -----------------------------------------------------------
   BALANCE & NOTIFY DROPDOWNS  (toggled by JS)
   ----------------------------------------------------------- */
.balance-dropdown {
  position: absolute;
  top: 38px;
  right: -60px;
  width: 200px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
}
.balance-label {
  background: #fde7b2;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
}
.balance-amount {
  background: #f4a64d;
  color: #fff;
  text-align: center;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 400;
}

.notify-dropdown {
  position: absolute;
  top: 36px;
  right: -80px;
  background: #fde7b2;
  color: #333;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  display: none;
  z-index: 1000;
}

@media (max-width: 768px) {
  .balance-dropdown { right: -10px; width: 140px; font-size: 10px; }
  .balance-label, .balance-amount { font-size: 10px; padding: 6px 0; }
  .notify-dropdown { right: -48px; width: 140px; font-size: 10px; }
}

/* -----------------------------------------------------------
   CHAT WIDGET  (toggled by JS display:flex/none)
   ----------------------------------------------------------- */
.chat-wrapper {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 360px;
  height: 520px;
  z-index: 9999;
}

.chat-list {
  background: #F7941D;
  color: #fff;
  height: 100%;
  border-radius: 12px;
  display: none;
  flex-direction: column;
}
.chat-users { overflow-y: auto; }
.chat-user {
  display: flex;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.chat-user:hover { background: rgba(255,255,255,0.08); }
.chat-user .name { color: #fff; font-weight: 600; }
.chat-user .last-msg { color: rgba(255,255,255,0.85); font-size: 13px; }

.chat-panel {
  background: #F7941D;
  height: 100%;
  border-radius: 12px;
  display: none;
  flex-direction: column;
}
.chat-header {
  padding: 12px;
  background: #F58220;
  color: #fff;
  display: flex;
  justify-content: space-between;
}
.chat-header button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.chat-header button:hover { background: rgba(255,255,255,0.25); }

.chat-body { flex: 1; padding: 12px; overflow-y: auto; }
.chat-msg { margin-bottom: 10px; display: flex; }
.chat-msg.sent { justify-content: flex-end; }
.bubble {
  background: transparent;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 75%;
}
.chat-msg.sent .bubble { background: rgba(255,255,255,0.15); }
.meta { color: rgba(255,255,255,0.75); font-size: 11px; text-align: right; }
.typing { color: rgba(255,255,255,0.8); }

.chat-input {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #F58220;
}
.chat-input input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px;
  background: transparent;
  color: #fff;
}
.chat-input input::placeholder { color: rgba(255,255,255,0.7); }

@media (max-width: 768px) {
  .chat-wrapper {
    width: calc(100vw - 24px);
    height: calc(100vh - 120px);
    right: 12px;
    top: 90px;
    pointer-events: none;
  }
  #chatList, #chatPanel { pointer-events: auto; }
}

/* -----------------------------------------------------------
   CAROUSEL  (pure CSS/JS replacement for Bootstrap carousel)
   ----------------------------------------------------------- */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.carousel-slide { display: none; }
.carousel-slide.active { display: block; }
.carousel-slide img { width: 100%; display: block; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover { background: rgba(0,0,0,0.55); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}
.carousel-dot.active { background: #2F4B7C; }

/* -----------------------------------------------------------
   FOOTER  (shared grid layout)
   ----------------------------------------------------------- */
.footer {
  background: #5b5b5b;
  padding: 60px 20px;
  color: #d1d1d1;
}
.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.footer-logo {
  font-size: 28px;
  font-weight: 700;
  color: #ffb347;
  margin-bottom: 10px;
}
.footer-tagline { color: #ffb347; font-size: 16px; }
.footer-col h4 { color: #fff; font-size: 18px; margin-bottom: 15px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; font-size: 15px; }
.footer-col ul li a { color: #cfcfcf; text-decoration: none; transition: color 0.3s ease; }
.footer-col ul li a:hover { color: #ffb347; }

@media (max-width: 900px) {
  .footer-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .footer-container {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
    flex-wrap: nowrap;
  }
  .footer-logo { font-size: 20px; margin-bottom: 4px; }
  .footer-tagline { font-size: 14px; line-height: 1.3; }
  .footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; text-align: left; }
  .footer-col ul li, .footer-col ul li a {
    font-size: 10px;
    line-height: 1;
    word-break: break-word;
    text-align: left;
  }
}
@media (max-width: 500px) {
  .footer-container { grid-template-columns: 1fr; text-align: center; }
}

/* -----------------------------------------------------------
   TABLE SHARED STYLES
   ----------------------------------------------------------- */
.result-table, .order-table, .travel-table {
  width: 100%;
  border-collapse: collapse;
}
.result-table th, .result-table td,
.order-table th, .order-table td,
.travel-table th, .travel-table td {
  padding: 10px;
  font-size: 13px;
  text-align: center;
}
.order-table th { text-align: left; color: #6c9ab5; font-weight: 600; padding: 12px 10px; }
.order-table td { padding: 14px 10px; color: #444; background: #fffde9; }

/* Status badges */
.status.pending { color: #e57373; font-weight: 600; }
.status.completed { color: #7cb342; font-weight: 600; }

/* Confirm actions */
.confirm .yes { color: #4a90e2; font-weight: 600; cursor: pointer; }
.confirm .no  { color: #999; cursor: pointer; }

/* Pill link (used in travel / share-travel tables) */
.pill-link {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f4a340;
  color: #fff;
  font-size: 11px;
  text-decoration: none;
}
.pill-link:hover { background: #e3932e; }

/* -----------------------------------------------------------
   HELP FLOATING BUTTON  (login / signup pages)
   ----------------------------------------------------------- */
.help {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #E58C2B;
  border: none;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 18px 30px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 9000;
}

/* -----------------------------------------------------------
   FORM INPUT SHARED STYLES  (login / signup cards)
   ----------------------------------------------------------- */
.card-input {
  width: 100%;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #F7F7F4;
  padding: 0 14px;
  outline: none;
  font-size: 12px;
  color: #2E3A43;
  font-family: 'Poppins', sans-serif;
}
.card-input:focus { border-color: #2F4B7C; }

/* -----------------------------------------------------------
   SHARETRAVELPLAN / TRAVELHISTORY FORM STYLES
   ----------------------------------------------------------- */
.content-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
.big-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  position: relative;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.form-box { flex: 1; }
.form-box h2 { font-size: 22px; font-weight: 700; color: #2f4b7c; margin-bottom: 4px; }
.form-box p  { color: #888; font-size: 14px; margin-bottom: 20px; }

.row-line {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.row-line label { font-size: 13px; color: #555; font-weight: 500; }
.input-like {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d5d5d5;
  background: #f9f6f0;
  padding: 0 12px;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  color: #333;
}
.input-like:focus { border-color: #f4a340; }
textarea.input-like.note-area { height: 70px; padding: 8px 12px; resize: none; border-radius: 10px; }

.submit-btn {
  margin-top: 18px;
  display: block;
  width: 160px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: #f4a340;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Poppins', sans-serif;
}
.submit-btn:hover { background: #e3932e; }

.traveler-img {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 230px;
}

.table-wrap {
  max-width: 900px;
  margin: 30px auto;
  display: flex;
  padding: 20px;
}
.table-card {
  background: #ffb764;
  padding: 20px;
  border-radius: 16px;
  width: 100%;
  overflow-x: auto;
}
.table-scroll { overflow-x: auto; }
.travel-table { background: #fff3d6; border-radius: 12px; overflow: hidden; min-width: 700px; }
.travel-table th { color: #666; background: #fff3d6; }
.travel-table td { background: #fff3d6; }
.travel-table th, .travel-table td { padding: 10px 12px; font-size: 13px; text-align: center; }

@media (max-width: 768px) {
  .big-card { flex-direction: column; padding: 26px 16px; }
  .row-line { grid-template-columns: 1fr; gap: 6px; }
  .traveler-img { display: none !important; }
}

/* -----------------------------------------------------------
   PROFILE PAGE SPECIFIC
   ----------------------------------------------------------- */
.profile-section {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
}
.avatar-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #f4a340;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  font-weight: 700;
  margin: 0 auto 16px;
}

/* -----------------------------------------------------------
   WALLET / ADD BALANCE SECTION
   ----------------------------------------------------------- */
.wallet-card {
  background: #fffdf4;
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  max-width: 700px;
  margin: 30px auto;
}

/* -----------------------------------------------------------
   POST PAGE TABS
   ----------------------------------------------------------- */
.tab-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid #2F4B7C;
  color: #2F4B7C;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  background: #2F4B7C;
  color: #fff;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -----------------------------------------------------------
   MODAL  (placeOrder confirmation)
   ----------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fffdf2;
  width: 90%;
  max-width: 420px;
  border-radius: 16px;
  padding: 30px 24px 28px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: scaleIn 0.25s ease;
}
@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  border: none; background: none;
  font-size: 26px; font-weight: 700;
  color: #777; cursor: pointer;
}
.modal-btn {
  height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.modal-btn.primary, .modal-btn.secondary { background: #4a86f7; color: #fff; }

/* -----------------------------------------------------------
   CLOSE MOBILE BUTTON
   ----------------------------------------------------------- */
.close-mobile {
  background: rgba(206,206,206,0.48);
  border: none;
  border-radius: 10px;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  position: relative;
  z-index: 100000;
  pointer-events: auto;
}

/* -----------------------------------------------------------
   HAMBURGER  (hidden on desktop, shown on mobile)
   ----------------------------------------------------------- */
.hamburger {
  display: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-center { display: none; }
}
