/* ==========================================================================
   VISA APPOINTMENT BOOKING APP - SHARETRIP DESIGN SYSTEM
   ========================================================================== */

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

:root {
  /* ShareTrip Signature Color Palette */
  --st-blue: #1882FF;
  --st-blue-hover: #126FDE;
  --st-blue-light: #E8F3FF;
  --st-blue-subtle: #F0F7FF;
  
  --st-orange: #FF6B00;
  --st-orange-light: #FFF3EB;

  --bg-page: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-subtle: #F8FAFC;
  
  --border-light: #E2E8F0;
  --border-subtle: #F1F5F9;
  --border-focus: #1882FF;
  
  --accent-success: #00C853;
  --accent-warning: #FF9900;
  --accent-danger: #FF3D00;

  --text-main: #3E4957;
  --text-heading: #1A2B3D;
  --text-muted: #5A6573;
  --text-dim: #9BA6B2;

  --font-heading: 'Murecho', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Murecho', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 32px;

  --shadow-sm: 0px 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0px 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0px 8px 28px rgba(24, 130, 255, 0.14);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
}

/* Layout Container */
.app-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ShareTrip Navbar Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--st-blue);
  text-decoration: none;
}

.brand-logo i {
  color: var(--st-blue);
  font-size: 1.6rem;
}

.brand-logo span.badge-tag {
  background: var(--st-orange);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-left: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-tabs {
  display: flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-pill);
}

.nav-tab {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: var(--transition);
}

.nav-tab.active {
  background: var(--st-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(24, 130, 255, 0.3);
}

.nav-tab:hover:not(.active) {
  color: var(--st-blue);
}

/* Supabase Connection Status Badge */
.supabase-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--st-blue-light);
  border: 1px solid rgba(24, 130, 255, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--st-blue);
  cursor: pointer;
}

.supabase-status-badge.demo-mode {
  background: var(--st-orange-light);
  border-color: rgba(255, 107, 0, 0.3);
  color: var(--st-orange);
}

/* Language Switcher Pill Selector */
.lang-switcher {
  display: flex;
  background: #E2E8F0;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--st-blue);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(24, 130, 255, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st-blue);
}

.supabase-status-badge.demo-mode .status-dot {
  background: var(--st-orange);
}

/* ShareTrip Hero Header */
.sharetrip-hero {
  background: linear-gradient(180deg, #1882FF 0%, #0D6EE4 100%);
  padding: 44px 20px 80px;
  color: #FFFFFF;
  text-align: center;
  margin-bottom: -55px;
  border-radius: 0 0 32px 32px;
}

.sharetrip-hero h1 {
  font-size: 2.3rem;
  color: #FFFFFF;
  margin-bottom: 6px;
  font-weight: 800;
}

.sharetrip-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

/* ShareTrip Signature Floating Search Card */
.sharetrip-search-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  max-width: 1100px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 10;
}

.search-tab-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.search-pill {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  background: #F1F5F9;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.search-pill.active, .search-pill:hover {
  background: var(--st-blue-light);
  color: var(--st-blue);
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--st-blue);
  box-shadow: 0 0 0 3px rgba(24, 130, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--st-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(24, 130, 255, 0.3);
}

.btn-primary:hover {
  background: var(--st-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 130, 255, 0.4);
}

.btn-secondary {
  background: var(--st-blue-light);
  border: 1px solid rgba(24, 130, 255, 0.2);
  color: var(--st-blue);
}

.btn-secondary:hover {
  background: #D4E8FF;
}

.btn-success {
  background: var(--accent-success);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 200, 83, 0.3);
}

.btn-danger {
  background: #FFEBEB;
  border: 1px solid #FFCDCD;
  color: var(--accent-danger);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: #FFFFFF;
}

/* Step Wizard Indicator */
.wizard-header {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.step-tracker {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.step-tracker::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #E2E8F0;
  z-index: 1;
}

.step-tracker-line {
  position: absolute;
  top: 20px;
  left: 40px;
  height: 3px;
  background: var(--st-blue);
  z-index: 1;
  transition: width 0.4s ease;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-node.active .step-circle {
  border-color: var(--st-blue);
  background: #FFFFFF;
  color: var(--st-blue);
  box-shadow: 0 0 0 4px rgba(24, 130, 255, 0.15);
}

.step-node.completed .step-circle {
  background: var(--st-blue);
  border-color: var(--st-blue);
  color: #FFFFFF;
}

.step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-node.active .step-label, .step-node.completed .step-label {
  color: var(--st-blue);
  font-weight: 700;
}

/* ShareTrip Content Cards */
.st-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.st-card:hover {
  box-shadow: var(--shadow-hover);
}

.st-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.st-card-title i {
  color: var(--st-blue);
}

/* Category Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.category-card:hover {
  border-color: var(--st-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.category-card.selected {
  border: 2px solid var(--st-blue);
  background: var(--st-blue-subtle);
}

.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--st-blue-light);
  color: var(--st-blue);
  margin-bottom: 8px;
}

.category-price {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--st-blue);
  margin: 8px 0 4px;
}

.category-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Slot Grid & Lock Timer */
.booking-grid-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

@media (max-width: 850px) {
  .booking-grid-container { grid-template-columns: 1fr; }
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.slot-btn {
  padding: 12px 8px;
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.slot-btn:hover:not(.disabled) {
  border-color: var(--st-blue);
  background: var(--st-blue-light);
}

.slot-btn.selected {
  background: var(--st-blue);
  border-color: var(--st-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(24, 130, 255, 0.3);
}

.slot-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.lock-timer-banner {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.timer-clock {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #D76B00;
}

/* Document Upload Cards */
.doc-item-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.dropzone {
  border: 2px dashed var(--st-blue);
  background: var(--st-blue-subtle);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover {
  background: var(--st-blue-light);
}

.uploaded-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: #2E7D32;
  font-weight: 600;
}

/* Checkout & Receipt */
.checkout-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.receipt-box {
  background: #FFFFFF;
  border: 2px solid var(--st-blue);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

/* Stage Timeline */
.stage-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 30px 0 10px;
}

.stage-line {
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: #E2E8F0;
  z-index: 1;
}

.stage-line-active {
  position: absolute;
  top: 18px;
  left: 30px;
  height: 4px;
  background: var(--st-blue);
  z-index: 1;
  transition: width 0.5s ease;
}

.stage-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100px;
  text-align: center;
}

.stage-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stage-item.completed .stage-icon, .stage-item.active .stage-icon {
  background: var(--st-blue);
  border-color: var(--st-blue);
  color: #FFFFFF;
}

.stage-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stage-item.active .stage-name, .stage-item.completed .stage-name {
  color: var(--st-blue);
  font-weight: 700;
}

/* Chatbot Floating Widget */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--st-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(24, 130, 255, 0.35);
  z-index: 900;
}

.chatbot-drawer {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  height: 480px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  z-index: 950;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.chatbot-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.chatbot-header {
  padding: 14px 18px;
  background: var(--st-blue);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h4 {
  color: #FFFFFF;
  font-size: 0.95rem;
}

.chatbot-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F8FAFC;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.chat-bubble.bot {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--st-blue);
  color: #FFFFFF;
  align-self: flex-end;
}

.chatbot-input-row {
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  background: #FFFFFF;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-hover);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-hover);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success { border-left: 4px solid var(--accent-success); }
.toast-error { border-left: 4px solid var(--accent-danger); }
.toast-info { border-left: 4px solid var(--st-blue); }

/* Printable */
@media print {
  body { background: #FFFFFF !important; }
  .navbar, .wizard-header, .sharetrip-hero, .btn, .chatbot-fab, .chatbot-drawer, .nav-tabs {
    display: none !important;
  }
  .receipt-box { box-shadow: none !important; border: 1px solid #000 !important; }
}
