/* ═══════════════════════════════════════════════════
   ZYPAWAY — Components
   Buttons, cards, inputs, modals, toasts, etc.
   ═══════════════════════════════════════════════════ */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  line-height: 1;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.btn-dark {
  background: var(--midnight);
  color: white;
  border-color: var(--midnight);
}
.btn-dark:hover {
  background: var(--midnight-soft);
  transform: translateY(-1px);
}

.btn-teal {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-teal:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-sm { padding: 8px 18px; font-size: var(--text-xs); }
.btn-lg { padding: 16px 32px; font-size: var(--text-base); }
.btn svg { flex-shrink: 0; }
.w-full { width: 100%; }

/* ─── Inputs ─── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}
.input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: all var(--duration-fast) ease;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.input::placeholder { color: var(--text-tertiary); }

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--duration-normal) ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--midnight);
}
.navbar-logo-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
  position: relative;
}
.navbar-link:hover { color: var(--primary); }
.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--duration-normal) var(--ease-out);
}
.navbar-link:hover::after { width: 100%; }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-business-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--accent);
  margin-right: 8px;
  transition: color var(--duration-fast) ease;
}
.navbar-business-link:hover { color: var(--accent-hover); }

@media (max-width: 768px) {
  .navbar { padding: 12px 20px; }
  .navbar-links, .navbar-business-link { display: none; }
}

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-left: 4px solid var(--accent);
  animation: slideInRight 0.35s var(--ease-out);
  max-width: 380px;
}
.toast svg { flex-shrink: 0; }
.toast-success { border-left-color: var(--accent-green); color: var(--accent-green); }
.toast-error   { border-left-color: var(--accent-red); color: var(--accent-red); }
.toast-info    { border-left-color: var(--accent); color: var(--accent); }
.toast span { color: var(--text-primary); }

/* ─── Auth Pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg-page) 0%, #FFF7ED 50%, #F0FDFA 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}
.auth-card-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-card-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--midnight);
  margin-bottom: 20px;
}
.auth-card-logo svg { color: var(--primary); }
.auth-card-header h2 {
  font-size: var(--text-2xl);
  margin-bottom: 6px;
}
.auth-card-header p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-divider {
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin: 20px 0;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-light);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: white;
  transition: all var(--duration-fast) ease;
}
.google-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-input);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.auth-footer a {
  color: var(--primary);
  font-weight: var(--weight-semibold);
}
.auth-footer a:hover { text-decoration: underline; }

/* ─── Trip Cards ─── */
.trip-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.trip-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.trip-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.trip-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.trip-card:hover .trip-card-image img {
  transform: scale(1.06);
}
.trip-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(26, 26, 46, 0.75);
  backdrop-filter: blur(8px);
  color: white;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.trip-card-content {
  padding: 18px 20px;
}
.trip-card-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trip-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.trip-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.trip-card-meta-item svg { width: 14px; height: 14px; }
.trip-card-meta-divider { color: var(--border-medium); }

/* ─── Trip Detail Page ─── */
.trip-detail-hero {
  position: relative;
  height: 360px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: 28px;
}
.trip-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trip-detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  background: linear-gradient(transparent, rgba(26, 26, 46, 0.85));
  color: white;
}
.trip-detail-title {
  font-size: var(--text-3xl);
  color: white;
  margin-bottom: 10px;
}
.trip-detail-meta {
  display: flex;
  gap: 20px;
  font-size: var(--text-sm);
  opacity: 0.9;
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
}
.timeline-day {
  margin-bottom: 36px;
  position: relative;
}
.timeline-day-marker {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-page);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-day-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--midnight);
  margin-bottom: 16px;
}
.timeline-activity {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color var(--duration-fast) ease;
}
.timeline-activity:hover { border-color: var(--primary-light); }
.timeline-activity-time {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.timeline-activity-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 6px;
}
.timeline-activity-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
.timeline-activity-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--accent);
  line-height: 1.5;
}

/* ─── Chat / Conversation ─── */
.conversation-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0;
  max-width: 100%;
}
.message {
  display: flex;
  gap: 12px;
  animation: fadeInUp 0.4s var(--ease-out);
}
.message-ai { align-items: flex-start; }
.message-user {
  flex-direction: row-reverse;
}
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: var(--weight-bold);
}
.message-avatar.ai {
  background: linear-gradient(135deg, var(--primary), var(--coral-dark));
  color: white;
}
.message-avatar.ai svg { width: 18px; height: 18px; stroke: white; }
.message-avatar.user {
  background: var(--accent);
  color: white;
}
.message-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.message-ai .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}
.message-user .message-bubble {
  background: var(--midnight);
  color: white;
  border-top-right-radius: 4px;
}
.message-bubble h3 {
  font-size: var(--text-base);
  margin: 12px 0 8px;
  color: var(--midnight);
}
.message-bubble strong { font-weight: var(--weight-semibold); }
.message-bubble p { margin-bottom: 8px; color: inherit; }
.message-bubble ul, .message-bubble ol {
  padding-left: 18px;
  margin: 8px 0;
}
.message-bubble li {
  margin-bottom: 4px;
  font-size: var(--text-sm);
}

/* ─── Generated Trip Card (in chat) ─── */
.generated-trip-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  animation: scaleIn 0.4s var(--ease-spring);
  max-width: 520px;
}
.generated-trip-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.generated-trip-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.generated-trip-header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(26, 26, 46, 0.8));
}
.generated-trip-header-overlay h3 { color: white; font-size: var(--text-xl); }
.generated-trip-body { padding: 20px; }
.generated-trip-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.generated-trip-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.generated-trip-meta-item svg { width: 18px; height: 18px; color: var(--accent); }
.generated-trip-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ─── Suggestion Cards ─── */
.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 20px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.suggestion-card:hover {
  border-color: var(--primary);
  background: var(--primary-bg-subtle);
  transform: translateY(-2px);
}
.suggestion-card-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: 6px;
}
.suggestion-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Feature Tabs ─── */
.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.feature-tab {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1.5px solid transparent;
  transition: all var(--duration-fast) ease;
  cursor: pointer;
}
.feature-tab:hover { color: var(--primary); background: var(--primary-bg); }
.feature-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.feature-tab-content { display: none; }
.feature-tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: 32px;
  max-width: 460px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s var(--ease-spring);
}

/* ─── Slide Panel ─── */
.slide-panel {
  position: fixed;
  top: 0;
  right: -460px;
  width: 450px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 1001;
  padding: 28px;
  overflow-y: auto;
  transition: right 0.35s var(--ease-out);
  box-shadow: var(--shadow-xl);
}
.slide-panel.open { right: 0; }
.slide-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.slide-panel-header h3 { font-size: var(--text-xl); }
.slide-panel-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}
.slide-panel-back:hover { background: var(--border-light); }
.slide-panel-back svg { width: 20px; height: 20px; }

/* ─── Onboarding Tooltip ─── */
.onboarding-tooltip {
  position: fixed;
  left: 70px;
  top: 80px;
  background: var(--midnight);
  color: white;
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  max-width: 320px;
  z-index: 50;
  font-size: var(--text-sm);
  animation: slideInLeft 0.5s var(--ease-out);
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
}
.onboarding-tooltip h4 {
  color: white;
  margin-bottom: 8px;
  font-size: var(--text-base);
}
.onboarding-tooltip p {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: 14px;
}
.onboarding-tooltip-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.onboarding-dismiss {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  padding: 6px 12px;
}
.onboarding-dismiss:hover { color: white; }
.onboarding-got-it {
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

/* ─── Inspiration Section ─── */
.inspiration-title {
  font-size: var(--text-lg);
  margin-bottom: 12px;
  color: var(--text-primary);
}
.inspiration-steps ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.8;
}
.inspiration-section {
  background: var(--bg-input);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
}
.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tiktok-thumbnail {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 9/16;
}
.tiktok-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.tiktok-thumbnail:hover img { transform: scale(1.05); }

.url-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 4px 6px 4px 14px;
}
.url-input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
  outline: none;
}
.url-submit-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--duration-fast) ease;
}
.url-submit-btn:hover { background: var(--primary-hover); }

/* ─── Account Page ─── */
.account-layout {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 32px;
}
.account-info { margin-bottom: 36px; }
.account-info h2 { margin-bottom: 8px; }
.account-info p { font-size: var(--text-sm); }
.account-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.account-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.account-field-input {
  display: flex;
  gap: 12px;
}
.account-field-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  background: var(--bg-input);
  color: var(--text-primary);
}
.account-field-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.update-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  background: white;
  white-space: nowrap;
  transition: all var(--duration-fast) ease;
}
.update-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.logout-btn {
  padding: 12px 24px;
  border: 1.5px solid var(--accent-red);
  border-radius: var(--radius-lg);
  color: var(--accent-red);
  font-weight: var(--weight-medium);
  transition: all var(--duration-fast) ease;
  align-self: flex-start;
}
.logout-btn:hover {
  background: var(--accent-red);
  color: white;
}

/* ─── Mobile Responsive ─── */
@media (max-width: 768px) {
  /* Toast: bottom-center on mobile */
  .toast-container {
    top: auto;
    bottom: 76px;
    right: 12px;
    left: 12px;
    align-items: center;
  }
  .toast { max-width: 100%; width: 100%; }

  /* Modal: full-width on mobile */
  .modal { width: 94%; padding: 22px 18px; border-radius: var(--radius-xl); }

  /* Slide panel: full-width on mobile */
  .slide-panel {
    right: -100vw;
    width: 100vw;
    padding: 20px 16px;
  }
  .slide-panel.open { right: 0; }
}

/* ─── Highlight text ─── */
.highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
