/* Import Montserrat font - PadelFly Brand Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ============================================================================
   PadelFly Design System - Extracted from padelfly.nl
   ============================================================================ */

:root {
  /* ==========================================================================
     COLORS - Brand Palette
     ========================================================================== */

  /* Primary Navy Blues */
  --navy-primary: #253C56;
  /* Elementor Primary */
  --navy-dark: #0B1622;
  /* Deep background */
  --navy-medium: #313A43;
  /* Elementor Text Color */
  --navy-light: #436D9D;
  /* Elementor Accent */

  /* Accent Yellow/Lime */
  --lime-primary: #EBEA19;
  /* Logo Black / Accent */
  --lime-bright: #F1F155;
  /* Elementor Secondary */
  --lime-hover: #FFFF8D;

  /* Text Colors */
  --text-white: #FFFFFF;
  --text-white-muted: rgba(255, 255, 255, 0.85);
  --text-white-subtle: rgba(255, 255, 255, 0.65);
  --text-dark: #313A43;
  /* Match Elementor Text */
  --text-dark-secondary: #576574;
  --text-muted: #94A3B8;
  --text-gray: #E2E8F0;

  /* Accent Colors */
  --accent-pink: #CC3366;
  --accent-blue: #436D9D;
  /* Match Elementor Accent */

  /* Utility Colors */
  --white: #FFFFFF;
  --gray-light: #E2E8F0;
  --gray-bg: #F8FAFC;

  /* ==========================================================================
     SHADOWS - Sleek & Modern (2026)
     ========================================================================== */
  --shadow-natural: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-deep: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-sharp: 0 0 0 1px rgba(0, 0, 0, 0.05);
  /* Border-like shadow */
  --shadow-light: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* ==========================================================================
     TYPOGRAPHY
     ========================================================================== */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Montserrat', -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Font Sizes (from WP preset) */
  --font-size-small: 13px;
  --font-size-base: 16px;
  --font-size-medium: 20px;
  --font-size-large: 36px;
  --font-size-xlarge: 42px;
  --font-size-hero: 55px;

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* ==========================================================================
     SPACING (from WP preset)
     ========================================================================== */
  --spacing-20: 0.44rem;
  --spacing-30: 0.67rem;
  --spacing-40: 1rem;
  --spacing-50: 1.5rem;
  --spacing-60: 2.25rem;
  --spacing-70: 3.38rem;
  --spacing-80: 5.06rem;

  /* Content Width */
  --content-width: 800px;
  --wide-width: 1200px;
  --block-gap: 24px;

  /* ==========================================================================
     BORDERS & RADIUS
     ========================================================================== */
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --border-radius-sm: 8px;

  /* ==========================================================================
     TRANSITIONS
     ========================================================================== */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ============================================================================
   THEME: Light Mode Overrides
   FULL LIGHT THEME: Header, Nav, and Body all switch to light colors.
   ============================================================================ */
[data-theme="light"] {
  /* BODY & SHELL: Soft Sporty Grey (Reduces Eye Strain) */
  --navy-primary: #F1F5F9;

  /* HEADER & NAV: Pure White */
  --navy-dark: #FFFFFF;

  /* TEXT: Dark Navy / Slate */
  --text-white: #0F172A;
  /* Slate 900 */
  --text-white-muted: #475569;
  /* Slate 600 */
  --text-white-subtle: #94A3B8;
  /* Slate 400 */

  /* CARDS: Pure White */
  --white: #FFFFFF;

  /* ACCENTS */
  --lime-primary: #D4D316;
  /* Darker Yellow for Text/Icons */
  --lime-soft: #FBFBAE;
  /* Pastel Yellow for Bubbles */

  /* BORDERS */
  --card-border-light: 1px solid #E2E8F0;

  /* SHADOWS */
  --shadow-heavy: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Fix: Card Borders in Light Mode */
[data-theme="light"] .center-card,
[data-theme="light"] .files-card,
[data-theme="light"] .suggestion-card {
  border: 1px solid #E2E8F0;
  /* Visible border */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Softer shadow */
}

/* Fix: Header Bottom Border in Light Mode */
[data-theme="light"] .app-header {
  border-bottom: 1px solid #E2E8F0;
}

/* Fix: Header Logo must be Dark in Light Mode */
/* NOTE: We use filter instead of fill because the SVG uses luminance masks. 
   Changing fill affects mask transparency. Inverting creates dark logo safely. */
/* Fix: Header Logo Colors */
/* Default (Dark Mode) */
.logo-base {
  fill: white;
}

.logo-accent {
  fill: #EBEA19;
  /* Logo Black value */
}

/* Light Mode Overrides */
[data-theme="light"] .logo-base {
  fill: #0B1622;
  /* Dark Navy for "PADEL" */
}

[data-theme="light"] .logo-accent {
  fill: #EBEA19;
  /* Keep Logo Black value for "FLY" */
}

/* Fix: Notification Badge in Light Mode */
[data-theme="light"] .badge {
  background: #FF3B30;
  /* Bright Red */
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
  /* White border to separate from icon */
}

/* Fix: Header Icon Buttons in Light Mode */
[data-theme="light"] .app-header .icon-btn {
  color: #0B1622;
  /* Dark icons on white header */
  background: rgba(0, 0, 0, 0.05);
  /* Subtle bg for buttons */
}

[data-theme="light"] .app-header .icon-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1863DC;
  /* Accent blue on hover */
}

/* Fix: App Title in Light Mode */
[data-theme="light"] .app-title {
  color: #0B1622;
}

/* Fix: Navigation Bar (Bottom) in Light Mode */
[data-theme="light"] .bottom-nav {
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

[data-theme="light"] .nav-item {
  color: #94A3B8;
  /* Muted default */
}

[data-theme="light"] .nav-item:hover {
  color: #1863DC;
}

[data-theme="light"] .nav-item.active {
  color: #1863DC;
  /* Active color blue */
}

/* Fix: Centered "Chat" button in Nav */
[data-theme="light"] .nav-item.nav-center {
  background: var(--lime-primary);
  color: #0B1622;
  /* Forces Dark Icon */
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Fix: Chat App Light Mode */
/* Fix: Chat App Light Mode */
[data-theme="light"] .chat-section,
[data-theme="light"] body.chat-app,
[data-theme="light"] .chat-input-area {
  background: #F1F5F9 !important;
}

[data-theme="light"] .chat-header {
  background: #FFFFFF;
  color: #0F172A;
  border-bottom: 1px solid #E2E8F0;
}

[data-theme="light"] .chat-input-container {
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .chat-input {
  background: #F8FAFC;
  color: #0F172A;
  border: 1px solid #CBD5E1;
}

[data-theme="light"] .chat-input::placeholder {
  color: #94A3B8;
  opacity: 1;
}

[data-theme="light"] .message.bot {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .message.user {
  background: #EBEA19;
  /* Brand Yellow */
  color: #0F172A;
  border: 1px solid #D4D316;
}

[data-theme="light"] .city-btn,
[data-theme="light"] .action-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .view-all {
  color: #D4D316 !important;
  font-weight: 600;
}


[data-theme="light"] .message.bot {
  background: #FFFFFF;
  color: #0B1622;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Fix: Gradients and Text on colored backgrounds need to stay white? 
   No, usually cards use standard text vars. If specific gradients exist,
   we need to check them. */

/* Overrides for specific elements that might be using --navy-medium directly */
/* Light Mode Card Overrides */
[data-theme="light"] .center-card,
[data-theme="light"] .info-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .files-card,
[data-theme="light"] .suggestion-card {
  background: #FFFFFF;
  color: #0B1622;
  border: 1px solid #E2E8F0;
  /* Explicit border for Light Mode */
  box-shadow: var(--shadow-small);
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--text-white);
  background: var(--navy-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings - Montserrat */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

h1 {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.27;
}

h2 {
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-semibold);
}

/* Layout Container */
.app-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header */
.app-header {
  padding: 1rem;
  text-align: center;
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.app-subtitle {
  font-size: 0.875rem;
  color: var(--text-white-muted);
  font-weight: var(--font-weight-normal);
}

/* Navigation Links - PadelFly Style */
.nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--lime-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--lime-hover);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

/* Center Card - Modern & Sleek */
.center-card {
  width: 100%;
  max-width: 480px;
  background: var(--navy-medium);
  /* Dark mode default */
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-deep);
  padding: 2rem;
  color: var(--text-white);
  transition: var(--transition);
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* Subtle dark border */
}

.center-card.fade-in {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


.center-card.fade-out {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  pointer-events: none;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Form Styles */
.form-section {
  margin-bottom: 2rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--navy-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(15, 39, 68, 0.1);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
  font-size: 1rem;
  color: var(--gray-dark);
  transition: var(--transition);
  appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--lime-bright);
  box-shadow: 0 0 0 3px rgba(241, 241, 85, 0.2);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.primary-button {
  background: var(--lime-bright);
  color: var(--navy-primary);
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-medium);
  width: 100%;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.primary-button:hover {
  background: var(--lime-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(241, 241, 85, 0.4);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Secondary/Outline Button */
.secondary-button {
  background: transparent;
  color: var(--lime-primary);
  border: 2px solid var(--lime-primary);
  padding: 0.875rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition);
}

.secondary-button:hover {
  background: var(--lime-primary);
  color: var(--navy-primary);
}

/* Food Poll Styles */
.food-poll {
  display: none;
}

.food-poll.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cuisine-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cuisine-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-light);
  border: 3px solid transparent;
}

.cuisine-tile:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

.cuisine-tile.selected {
  border-color: var(--lime-bright);
  box-shadow: 0 0 0 2px rgba(241, 241, 85, 0.4);
  transform: scale(1.02);
}

.cuisine-image {
  width: 100%;
  height: 70%;
  object-fit: cover;
  background: var(--gray-light);
  /* No gradient */
}

.cuisine-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.cuisine-tile input {
  display: none;
}

.selection-counter {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-medium);
  margin-bottom: 1rem;
}

/* Map Container */
.map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 5;
}

.map-container.active {
  opacity: 1;
  pointer-events: all;
}

.map-content {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.map-header {
  padding: 1rem;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-button {
  background: var(--gray-light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--gray-dark);
  cursor: pointer;
  transition: var(--transition);
}

.back-button:hover {
  background: var(--gray-medium);
  color: var(--white);
}

.map-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy-primary);
}

#map {
  flex: 1;
  width: 100%;
  background: #f0f0f0;
}

/* Suggestions */
.suggestions-container {
  padding: 1rem;
  background: var(--white);
  max-height: 40vh;
  max-height: 40dvh;
  overflow-y: auto;
}

.suggestion-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.suggestion-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--gray-light);
  /* No gradient */
}

.suggestion-content {
  padding: 1rem;
}

.suggestion-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
}

.suggestion-description {
  font-size: 0.875rem;
  color: var(--gray-medium);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.suggestion-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium);
  transition: var(--transition);
}

.suggestion-link:hover {
  color: var(--accent-pink);
}

/* Welcome Message */
.welcome-message {
  background: rgba(232, 232, 111, 0.15);
  border: 1px solid rgba(232, 232, 111, 0.4);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--navy-primary);
  display: none;
}

.welcome-message.show {
  display: block;
  animation: slideInUp 0.4s ease-out;
}

/* Responsive Design - Mobile First */
@media (min-width: 640px) {
  .app-title {
    font-size: 1.75rem;
  }

  .center-card {
    max-width: 560px;
    padding: 2.5rem;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cuisine-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .app-header {
    padding: 1.5rem;
  }

  .main-content {
    padding: 2rem;
  }

  .center-card {
    max-width: 640px;
    padding: 3rem;
  }

  .form-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cuisine-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .suggestions-container {
    padding: 1.5rem;
  }

  .suggestion-card {
    display: flex;
    align-items: center;
  }

  .suggestion-image {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
  }

  .suggestion-content {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .center-card {
    max-width: 720px;
  }

  .form-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .suggestions-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-height: none;
  }

  .suggestion-card {
    display: block;
  }

  .suggestion-image {
    width: 100%;
    height: 160px;
  }
}

/* Micro-interactions */
@keyframes markerDrop {
  0% {
    transform: scale(0) translateY(-50px);
    opacity: 0;
  }

  70% {
    transform: scale(1.1) translateY(5px);
    opacity: 1;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes markerBounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  60% {
    transform: scale(1.1);
  }
}

.marker-drop {
  animation: markerDrop 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.fade-out {
  animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ============================================================================
   CHAT APP STYLES - PadelFly Chat Experience
   ============================================================================ */

/* Chat App Container - Portrait orientation */
.app-container {
  width: 100%;
  max-width: 480px;
  /* Fallback for older browsers */
  height: 100vh;
  /* Modern viewport units for mobile - accounts for browser UI */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy-dark);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  border: 1px solid #1c2e48;
  border-top: 0;
  border-bottom: 0;
}

/* Override body for chat app */
body.chat-app {
  display: flex;
  justify-content: center;
  background: var(--navy-dark);
  /* Fallback */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

html.chat-app,
html.chat-app body {
  /* Fallback */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Input placeholder styling */
input::placeholder {
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
}

input:focus {
  outline: none;
}

/* Map Section */
.map-section {
  width: 100%;
  height: 30vh;
  height: 30dvh;
  min-height: 200px;
  position: relative;
}

.map-section #map {
  width: 100%;
  height: 100%;
}

/* InfoWindow Styling */
.info-window {
  max-width: 300px;
  font-family: var(--font-body);
}

.info-window-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.info-window-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.info-window-address {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.info-window-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}

.info-window-stars {
  color: #FFA500;
}

.info-window-link {
  display: inline-block;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  margin-top: 8px;
}

.info-window-link:hover {
  text-decoration: underline;
}

/* Pin Animation Styles */
.pin-container {
  position: relative;
  width: 40px;
  height: 40px;
}

.pin-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
}

.pin-image-base {
  z-index: 1;
  filter: invert(1);
}

.pin-image-animated {
  z-index: 2;
  animation: hueRotate 6s linear infinite;
}

@keyframes hueRotate {
  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(360deg);
  }

  100% {
    filter: hue-rotate(0deg);
  }
}

/* Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--navy-dark);
  overflow: hidden;
}

/* Fullwidth chat when map is hidden */
.chat-section-fullwidth {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  border-radius: 0;
}

@media (min-width: 768px) {
  .chat-section-fullwidth {
    border-radius: var(--radius-lg);
    margin-top: 20px;
    margin-bottom: 20px;
    max-height: calc(100dvh - 40px);
    box-shadow: var(--shadow-deep);
  }
}

.chat-header {
  padding: 20px;
  text-align: center;
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Chat Message Bubbles */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  animation: messageSlideIn 0.3s ease-out;
}

.message.user {
  align-self: flex-end;
  background: var(--lime-primary);
  color: var(--navy-dark);
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border-bottom-left-radius: 4px;
}

.message code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.message strong {
  font-weight: var(--font-weight-semibold);
}

.message em {
  font-style: italic;
}

.message a {
  color: var(--lime-bright);
  text-decoration: underline;
}

.message a:hover {
  color: var(--lime-hover);
}

.typing-indicator {
  opacity: 0.7;
  animation: typingPulse 1.5s ease-in-out infinite;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Chat Input */
.chat-input-container {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--navy-dark);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  font-size: 15px;
  outline: none;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.chat-input:focus {
  border-color: var(--lime-primary);
  background: rgba(255, 255, 255, 0.08);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--lime-primary);
  color: var(--navy-dark);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-fast);
}

.send-button:hover:not(:disabled) {
  background: var(--lime-bright);
}

.send-button:active:not(:disabled) {
  transform: scale(0.95);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Notification Permission Banner */
.notification-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
  background: linear-gradient(135deg, var(--lime-primary) 0%, var(--lime-bright) 100%);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.notification-banner-text {
  flex: 1;
  color: var(--navy-dark);
  font-size: 14px;
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
}

.notification-banner-buttons {
  display: flex;
  gap: 8px;
}

.notification-banner button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.notification-banner .enable-btn {
  background: var(--navy-dark);
  color: var(--text-white);
}

.notification-banner .enable-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.notification-banner .dismiss-btn {
  background: rgba(0, 0, 0, 0.2);
  color: var(--navy-dark);
}

.notification-banner .dismiss-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}


/* ============================================================================
   APP SHELL - Common Layout Components
   ============================================================================ */

/* App Page Base */
.app-page {
  background: var(--navy-dark);
  min-height: 100dvh;
}

/* Light Mode: Soft Grey background instead of harsh white */
[data-theme="light"] .app-page {
  background: #F1F5F9;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.app-logo svg {
  width: 100%;
  max-width: 200px;
  height: auto;
}

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

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-white);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent-pink);
  color: var(--white);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* App Main Content */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 80px;
  /* Space for bottom nav */
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  max-width: 600px;
  margin: 0 auto;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  color: var(--text-white-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-item svg {
  width: 26px;
  height: 26px;
}

/* Visually hidden but accessible to screen readers */
.nav-item .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-item.active {
  color: var(--lime-primary);
}

.nav-item:hover:not(.active) {
  color: var(--text-white);
}

/* Center nav item - Yellow GroupChat button */
.nav-item.nav-center {
  position: relative;
  background: var(--lime-primary);
  color: var(--navy-dark);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  margin-top: -20px;
  box-shadow: 0 4px 12px rgba(232, 232, 111, 0.4);
  transition: all 0.2s ease;
}

.nav-item.nav-center svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.nav-item.nav-center:hover {
  background: var(--lime-hover);
  transform: scale(1.05);
  color: var(--navy-dark);
}

.nav-item.nav-center.active {
  background: var(--lime-bright);
  color: var(--navy-dark);
}


/* ============================================================================
   FEED PAGE COMPONENTS
   ============================================================================ */

/* Trip Card */
.trip-card {
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
  padding: 20px;
  border-radius: var(--radius-lg);
  color: var(--text-white);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

[data-theme="light"] .trip-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0B1622;
  box-shadow: var(--shadow-small);
}

[data-theme="light"] .lesson-time,
[data-theme="light"] .voting-icon,
[data-theme="light"] .team-member {
  background: #F1F5F9 !important;
  /* Visible grey background */
  color: #0B1622 !important;
}

[data-theme="light"] .team-member.you {
  background: rgba(235, 234, 25, 0.2) !important;
  /* Yellow tint for 'you' */
  border: 1px solid rgba(235, 234, 25, 0.4);
}

[data-theme="light"] .lesson-title,
[data-theme="light"] .lesson-hour,
[data-theme="light"] .voting-title,
[data-theme="light"] .team-name {
  color: #0B1622 !important;
}

[data-theme="light"] .lesson-day {
  color: #E6C200 !important;
  /* Darker yellow for text readability */
}

[data-theme="light"] .lesson-location,
[data-theme="light"] .voting-subtitle {
  color: #64748B !important;
}



.trip-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.trip-flag {
  font-size: 24px;
}

.trip-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-white);
}

.trip-dates {
  font-size: var(--font-size-sm);
  color: var(--lime-primary);
  margin-bottom: 16px;
}

.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-white-muted);
}

.meta-item svg {
  width: 16px;
  height: 16px;
}

/* Feed Cards */
/* Feed Cards */
.feed-card {
  background: rgba(255, 255, 255, 0.05);
  /* Default Dark Mode */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}

[data-theme="light"] .feed-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-small);
}

[data-theme="light"] .action-title,
[data-theme="light"] .challenge-title {
  color: var(--navy-dark);
  /* Ensure titles are readable */
}

.feed-card-content {
  padding: 16px;
}

/* Action Card (MVP Vote, Restaurant Vote) */
.action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.action-info {
  flex: 1;
}

.action-label {
  font-size: var(--font-size-xs);
  color: var(--lime-primary);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.action-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-white);
}

.action-time {
  font-size: var(--font-size-xs);
  color: var(--text-white-muted);
  white-space: nowrap;
}

.action-btn {
  padding: 10px 20px;
  background: var(--lime-primary);
  color: var(--navy-dark);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--lime-hover);
}

/* Challenge Card */
.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.challenge-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-white);
}

.challenge-points {
  padding: 4px 10px;
  background: rgba(232, 232, 111, 0.2);
  color: var(--lime-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.challenge-desc {
  font-size: var(--font-size-sm);
  color: var(--text-white-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.challenge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.challenge-progress {
  font-size: var(--font-size-sm);
  color: var(--text-white-muted);
}

.challenge-progress strong {
  color: var(--lime-primary);
}

.complete-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--lime-primary);
  border: 1px solid var(--lime-primary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition-fast);
}

.complete-btn:hover {
  background: var(--lime-primary);
  color: var(--navy-dark);
}

/* Section Label */
.section-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-white-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 12px;
}

/* Leaderboard Preview */
.leaderboard-list {
  padding: 8px 16px;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leader-row:last-child {
  border-bottom: none;
}

.leader-row.you {
  background: rgba(232, 232, 111, 0.1);
  margin: 0 -16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.rank.r1 {
  background: gold;
  color: var(--navy-dark);
}

.rank.r2 {
  background: silver;
  color: var(--navy-dark);
}

.rank.r3 {
  background: #cd7f32;
  color: var(--navy-dark);
}

.leader-info {
  flex: 1;
}

.leader-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-white);
}

.leader-tag {
  font-size: var(--font-size-xs);
  color: var(--lime-primary);
}

.leader-points {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--lime-primary);
}

.view-all {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--lime-primary);
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.view-all:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Tip Card */
.tip-image {
  height: 120px;
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-image-placeholder {
  font-size: 48px;
}

.tip-content {
  padding: 16px;
}

.tip-category {
  font-size: var(--font-size-xs);
  color: var(--lime-primary);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tip-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-white);
  margin: 4px 0 8px;
}

.tip-desc {
  font-size: var(--font-size-sm);
  color: var(--text-white-muted);
  line-height: 1.5;
}

.tip-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tip-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tip-btn svg {
  width: 16px;
  height: 16px;
}

.tip-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-white);
}

.tip-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tip-btn.primary {
  background: var(--lime-primary);
  border: none;
  color: var(--navy-dark);
}

.tip-btn.primary:hover {
  background: var(--lime-hover);
}