/* ============================================
   RigSize Live - Watersports Theme Stylesheet
   ============================================ */

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

html {
  background-color: #1565a0; /* Vult safe-area zones (home indicator) buiten app content */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
}

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

/* Custom Logo Icon */
.custom-logo {
  width: 2rem;
  height: 2rem;
  color: white;
}

.custom-logo-icon {
  width: 100%;
  height: 100%;
  color: white;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 2500;
  padding-top: env(safe-area-inset-top, 0px);
}

.header-content {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.header-auth-btn,
.header-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
  /* Fallback: toon een placeholder als icon niet laadt */
  min-width: 40px;
  min-height: 40px;
}

.header-auth-btn:hover,
.header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Language selector in header */
.header-lang-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
}
.header-lang-btn:hover { background: rgba(255, 255, 255, 0.3); }
.header-lang-btn svg { stroke: white !important; color: white !important; }

/* Language Bottom Sheet */
.lang-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: langOverlayIn 0.2s ease-out;
}
.lang-sheet-overlay.hidden { display: none; }
@keyframes langOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.lang-sheet {
  background: #ffffff;
  border-radius: 1.25rem 1.25rem 0 0;
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0 calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  animation: langSheetSlide 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
@keyframes langSheetSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }

.lang-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin: 0.25rem auto 0.75rem;
}

.lang-sheet-options {
  display: flex;
  flex-direction: column;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
}
.lang-option:hover { background: #f1f5f9; }
.lang-option:active { background: #e2e8f0; }
.lang-option.active { background: #f0f9ff; }

.lang-option-flag {
  font-size: 1.5rem;
  line-height: 1;
  width: 2rem;
  text-align: center;
}

.lang-option-info {
  flex: 1;
}

.lang-option-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.lang-option-check {
  color: #0891b2;
  opacity: 0;
  transition: opacity 0.15s;
}
.lang-option.active .lang-option-check { opacity: 1; }

.header-auth-btn svg,
.header-menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: white !important;
  color: white !important;
  pointer-events: none;
}

.header-auth-btn.logged-in {
  background: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.5);
  position: relative;
}

.header-auth-btn.logged-in:not(.has-avatar)::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
}

.header-auth-btn.logged-in svg {
  stroke: white !important;
  color: white !important;
}

.header-auth-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.header-auth-btn.has-avatar {
  padding: 0;
  overflow: hidden;
  background: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.5);
  width: 40px;
  height: 40px;
}

/* Slide Menu */
.slide-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  overflow: hidden;
  z-index: 2600;
}

.slide-menu.hidden {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  background: none;
  font-size: 1rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.menu-item * {
  pointer-events: none;
}

.menu-item:hover {
  background: #f1f5f9;
}

.menu-item:active {
  background: #e2e8f0;
}

.menu-item i {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.menu-item.active {
  background: #ecfeff;
  color: #0891b2;
}

.menu-item.active i {
  color: #0891b2;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  font-size: 0.75rem;
  color: #a5f3fc;
  margin: 0;
}

.icon-large {
  width: 2rem;
  height: 2rem;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon-button i {
  width: 1.5rem;
  height: 1.5rem;
}

/* View Selector Dropdown */
.view-selector {
  position: relative;
  z-index: 3000;
}

.view-dropdown-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
  min-height: 48px;
  position: relative;
  z-index: 3001;
}

.view-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.view-dropdown-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

.chevron-icon {
  margin-left: 0.25rem;
  transition: transform 0.2s;
}

.view-dropdown-btn.open .chevron-icon {
  transform: rotate(180deg);
}

.view-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  overflow: hidden;
  z-index: 3000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s, transform 0.2s;
}

.view-dropdown.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
  text-align: left;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item.active {
  background: #e0f2fe;
  color: #0891b2;
}

.dropdown-item i {
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor;
}

/* Welcome Screen */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.welcome-screen.hidden {
  display: none;
}

/* Hide header when welcome screen is active */
body:has(.welcome-screen:not(.hidden)) .header {
  display: none;
}

.welcome-content {
  background: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: auto;
}

.welcome-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.welcome-icon i {
  width: 36px;
  height: 36px;
  color: white;
}

.welcome-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.25rem 0;
}

.welcome-subtitle {
  font-size: 0.875rem;
  color: #0891b2;
  text-align: center;
  margin: 0 0 1.5rem 0;
  font-weight: 500;
}

.welcome-explanation {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.welcome-explanation h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.welcome-explanation p {
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
}

.welcome-benefits {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.benefit-item i {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  color: #0891b2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0fdfa;
  border-radius: 8px;
}

/* Force all SVG icons to same size */
.benefit-item i svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.welcome-form h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.form-help {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.welcome-form .input-group {
  margin-bottom: 1rem;
}

.welcome-form .input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.welcome-form .input-group label i {
  width: 1rem;
  height: 1rem;
  color: #64748b;
}

.btn-large {
  padding: 0.875rem;
  font-size: 1rem;
  width: 100%;
}

@media (max-height: 700px) {
  .welcome-content {
    padding: 1rem;
  }
  
  .welcome-icon {
    width: 56px;
    height: 56px;
  }
  
  .welcome-icon i {
    width: 32px;
    height: 32px;
  }
  
  .welcome-content h1 {
    font-size: 1.25rem;
  }
  
  .welcome-explanation {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation p {
    margin-bottom: 0.75rem;
  }
}

/* Surfspot Search */
.surfspot-search {
  padding: 0 1rem 0.75rem;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: #64748b;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 3rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 0.9375rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.clear-search {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.clear-search:hover {
  color: white;
}

.clear-search i {
  width: 1.25rem;
  height: 1.25rem;
}

.surfspot-suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1rem;
  right: 1rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.surfspot-item {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s;
}

.surfspot-item:last-child {
  border-bottom: none;
}

.surfspot-item:hover {
  background: #f8fafc;
}

.surfspot-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.surfspot-location {
  font-size: 0.875rem;
  color: #64748b;
}

.surfspot-distance {
  font-size: 0.75rem;
  color: #0891b2;
  margin-top: 0.25rem;
}
/* Main Content */
.main-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding-bottom: 0; /* tab bar is apart */
}

/* Bottom Tab Bar */
.bottom-tab-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #1565a0;
  border-top: none;
  padding-bottom: 0;
  flex-shrink: 0;
  z-index: 1100;
  position: relative;
}

.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 6px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: visible;
}

.tab-bar-item i,
.tab-bar-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  color: inherit;
}

.tab-bar-item span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tab-bar-item.active {
  color: #ffffff;
}

.tab-bar-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 0 0 2px 2px;
}

.tab-bar-item:active {
  opacity: 0.7;
}

.view-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Map Styles */
.map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Session Setup Trigger Button */
.session-setup-trigger {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 8px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: none;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #0891b2;
  font-weight: 600;
  font-size: 0.8125rem;
  z-index: 1200;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.session-setup-trigger:active {
  transform: translateX(-50%) scale(0.96);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.session-setup-trigger.hidden {
  display: none;
}

.session-setup-trigger i {
  width: 1.125rem;
  height: 1.125rem;
}

/* Session Setup Full Page */
.session-setup-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f1f5f9;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpSetup 0.25s ease-out;
}

@keyframes slideUpSetup {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.session-setup-page.hidden {
  display: none;
}

.session-setup-header {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem 1rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.session-setup-header h1 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.session-setup-back {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 0.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
}

.session-setup-back:active {
  background: rgba(255,255,255,0.3);
}

.session-setup-back i {
  width: 1.25rem;
  height: 1.25rem;
}

.session-setup-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

.session-setup-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-setup-intro {
  font-size: 0.9375rem;
  color: #334155;
  font-weight: 500;
  margin: 0;
  text-align: center;
}

.session-setup-gps-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  text-align: center;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  justify-content: center;
}

.gps-note-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #0891b2;
}

/* Input Styles */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.input-half {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: calc(50% - 0.25rem);
}

.input-half input {
  font-size: 0.9375rem;
  padding: 0.5rem 0.625rem;
}

.input-half select {
  font-size: 0.9375rem;
  padding: 0.5rem 0.625rem;
}

#sessionProfileFields {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.input-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
}

.label-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: #9ca3af;
}

.input-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
}

.input-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
  background: white;
  color: #1f2937;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

.input-group select:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Gear input hidden field */
.gear-input.hidden-field {
  display: none;
}

/* Gear input select styling */
select.gear-input {
  padding: 0.5rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  outline: none;
  background: white;
  color: #1f2937;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  padding-right: 1.5rem;
  min-width: 80px;
}

.input-group input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Button Styles */
.btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn i {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 20px 25px -5px rgba(8, 145, 178, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #e11d48 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}

/* Session Login Hint */
.session-login-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.session-login-hint:hover {
  background: #fde68a;
  border-color: #fbbf24;
}

.session-login-hint i {
  width: 16px;
  height: 16px;
  color: #d97706;
  flex-shrink: 0;
}

.session-login-hint.hidden {
  display: none;
}

/* Session Status */
.session-status {
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #d1fae5;
  color: #065f46;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Modern Status Badge */
.status-badge-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #d1fae5;
  color: #065f46;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge-modern .status-text {
  color: #065f46;
}

.status-badge-modern .status-divider {
  color: #6ee7b7;
  font-weight: 400;
}

.status-badge-modern .status-gear {
  color: #047857;
  font-weight: 700;
}

.status-pulse {
  width: 0.5rem;
  height: 0.5rem;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   SESSION SUMMARY MODAL
   ============================================ */
.summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.summary-modal-content {
  background: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.summary-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.summary-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.summary-icon i {
  width: 28px;
  height: 28px;
  color: white;
}

.summary-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  display: block;
  border: 3px solid #10b981;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.summary-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.summary-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.summary-stat-row.single {
  grid-template-columns: 1fr;
}

.summary-stat-row.single .summary-stat {
  justify-content: center;
}

.summary-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.875rem;
  min-width: 0;
  overflow: hidden;
}

.summary-stat > i {
  width: 20px;
  height: 20px;
  color: #0891b2;
  flex-shrink: 0;
}

.summary-stat > svg {
  flex-shrink: 0;
}

.summary-stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.summary-stat-label {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-saved,
.summary-tip,
.summary-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.625rem;
  border-radius: 0.5rem;
}

.summary-saved {
  background: #d1fae5;
  color: #065f46;
}

.summary-saved i {
  width: 16px;
  height: 16px;
}

.summary-tip {
  background: #fef3c7;
  color: #92400e;
}

.summary-tip i {
  width: 16px;
  height: 16px;
}

.summary-error {
  background: #fee2e2;
  color: #991b1b;
}

.summary-error i {
  width: 16px;
  height: 16px;
}

/* Settings View */
.settings-container {
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
  position: relative;
  z-index: 2000;
}

.settings-card {
  max-width: 28rem;
  margin: 0 auto 8rem;
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.settings-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.settings-icon i {
  width: 1.5rem;
  height: 1.5rem;
}

.settings-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.settings-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Avatar Upload */
.avatar-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.avatar-upload {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder-icon {
  width: 36px;
  height: 36px;
  color: #cbd5e1;
}

.avatar-upload-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.avatar-upload-overlay i {
  width: 14px;
  height: 14px;
}

.avatar-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.avatar-remove-btn i {
  width: 12px;
  height: 12px;
}

.avatar-remove-btn:hover {
  background: #fef2f2;
}

/* Chat avatar */
.chat-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-bubble-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-bubble-avatar-placeholder i {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.chat-bubble-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 80%;
  align-self: flex-start;
}

.chat-bubble-wrapper.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Map popup avatar */
.popup-header-with-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.popup-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popup-avatar-placeholder i {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Info Box */
.info-box {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 0.5rem;
}

.info-box h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e3a8a;
  margin: 0 0 0.5rem 0;
}

.info-box p {
  font-size: 0.75rem;
  color: #1e40af;
  line-height: 1.5;
  margin: 0;
}

.settings-section {
  margin: 1.5rem 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.section-title i {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
}

.gear-section-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.5rem 0 0.75rem 0;
}

.gear-section-header h3 i,
.gear-section-header h3 svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
}

.map-style-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.map-style-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  font-weight: 500;
  font-size: 0.875rem;
}

.map-style-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.map-style-btn.active {
  background: #e0f2fe;
  border-color: #0891b2;
  color: #0891b2;
}

.map-style-btn i {
  width: 1.5rem;
  height: 1.5rem;
}

/* Sport Type Selector */
.sport-type-selector {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
}

.sport-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sport-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sport-type-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.sport-type-btn i {
  width: 1.1rem;
  height: 1.1rem;
}

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

.sport-type-btn.active .sport-icon {
  filter: brightness(0) invert(1);
}

.profile-sport-selector {
  margin-bottom: 0;
}

/* Fin Type Selector (Vin/Foil) — compacter dan sport selector */
.fin-type-selector {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  background: var(--bg-secondary);
  border-radius: 0.4rem;
  max-width: 220px;
}

.fin-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem 0.4rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fin-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.fin-type-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.fin-type-btn i {
  width: 1.1rem;
  height: 1.1rem;
}

.fin-type-btn .sport-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.fin-type-btn.active .sport-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.profile-fin-selector {
  margin-bottom: 0;
}

/* Wind Unit Selector */
.wind-unit-selector {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  padding: 0.2rem;
  background: var(--bg-secondary);
  border-radius: 0.4rem;
  max-width: 260px;
}

.wind-unit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.wind-unit-btn:active { opacity: 0.8; }

.wind-unit-btn.active {
  background: linear-gradient(135deg, #0891b2, #0ea5e9);
  color: white;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.wind-unit-label {
  font-weight: 700;
  font-size: 0.85rem;
}

/* Fin Badge (history cards) */
.fin-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Hide board volume for kite/wing */
.input-group.hidden-field {
  display: none;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.leaflet-popup-tip {
  background: white;
}

/* Modern Popup Content - Apple Fitness Style */
.popup-content {
  min-width: 200px;
  padding: 1rem;
}

.popup-header {
  font-weight: 700;
  font-size: 1.125rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

/* Gear section - Sail & Board prominent */
.popup-gear {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.popup-gear-item {
  text-align: center;
}

.popup-gear-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0891b2;
  line-height: 1;
}

.popup-gear-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.popup-gear-divider {
  width: 1px;
  height: 2.5rem;
  background: #e2e8f0;
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.popup-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.popup-detail-label {
  color: #64748b;
}

.popup-detail-value {
  font-weight: 600;
  color: #0f172a;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .header-content {
    padding: 0.75rem 1rem;
  }
  
  .header-title h1 {
    font-size: 1.125rem;
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="number"] {
    font-size: 16px;
  }
}

.about-content {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
}

.about-description {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
}

.about-feature i {
  width: 1.25rem;
  height: 1.25rem;
  color: #0891b2;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* About Page */
.about-page-container {
  height: 100%;
  overflow-y: auto;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
}

.about-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.about-page-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #2563eb 0%, #34d399 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.about-page-icon i {
  width: 48px;
  height: 48px;
  color: white;
}

.about-page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.about-page-subtitle {
  font-size: 0.875rem;
  color: #0891b2;
  font-weight: 500;
  margin: 0;
}

.about-page-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.about-page-section {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-page-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.about-page-section p {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.about-page-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.about-page-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}

.about-page-feature i {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  color: #0891b2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfeff;
  border-radius: 8px;
}

/* Force all SVG icons to same size */
.about-page-feature i svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.about-page-feature span {
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
}

.about-page-version {
  text-align: center;
  padding: 1.5rem 0 0.5rem 0;
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.about-page-version span {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}

/* List View */
.list-container {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.list-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.surfers-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 120px; /* Ruimte voor session panel */
}

.surfer-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.surfer-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.surfer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.surfer-avatar.own-marker {
  border: 3px solid #fbbf24;
}

.surfer-info {
  flex: 1;
  min-width: 0;
}

.surfer-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.you-badge {
  background: #fbbf24;
  color: #78350f;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.surfer-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.surfer-detail {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.625rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.125rem;
}

.detail-value {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.875rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Surfspot Markers */
.surfspot-marker {
  background: none !important;
  border: none !important;
}

.surfspot-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  cursor: pointer;
  transition: transform 0.2s ease;
}

.surfspot-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.surfspot-marker:hover .surfspot-icon {
  transform: scale(1.15);
}

.surfspot-popup {
  text-align: center;
  padding: 0.5rem;
}

.surfspot-popup-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.surfspot-popup-location {
  font-size: 0.75rem;
  color: #64748b;
}

/* Auth Status */
.auth-status {
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.auth-logged-in {
  color: #059669;
}

.auth-logged-out {
  color: #64748b;
}

.auth-logged-out a {
  color: #0891b2;
  text-decoration: underline;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 1rem;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.auth-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}

.auth-close-btn:hover {
  background: #e2e8f0;
}

.auth-header {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
}

.auth-icon i {
  width: 24px;
  height: 24px;
}

.auth-header h2 {
  font-size: 1.5rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #64748b;
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-message {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.auth-message:empty {
  display: none;
}

.auth-message.success {
  background: #d1fae5;
  color: #059669;
}

.auth-message.error {
  background: #fee2e2;
  color: #dc2626;
}

.auth-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.auth-links {
  text-align: center;
  margin-top: 0.5rem;
}

.auth-links a {
  font-size: 0.875rem;
  color: #0891b2;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #64748b;
}

.auth-switch a {
  color: #0891b2;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Social Login Buttons */
.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.apple-btn {
  background: #000;
  color: #fff;
}

.apple-btn:hover {
  background: #1a1a1a;
}

.google-btn {
  background: #fff;
  color: #1f2937;
  border: 2px solid #e2e8f0;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  font-size: 0.8125rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Session History */
.history-page-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 20px));
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.history-page-header {
  text-align: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

/* Compact header - icon and title inline */
.history-page-header-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.history-page-icon-small {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.history-page-icon-small i {
  width: 18px;
  height: 18px;
}

.history-page-header-compact h1 {
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0;
  font-weight: 600;
}

/* History Tabs */
.history-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.history-tab {
  flex: 1;
  padding: 7px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.history-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-tab-panel.hidden {
  display: none !important;
}

.history-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.coming-soon-icon {
  width: 56px;
  height: 56px;
  background: #f0f9ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0891b2;
  margin-bottom: 1rem;
}

.coming-soon-icon i {
  width: 28px;
  height: 28px;
}

.history-coming-soon h2 {
  font-size: 1.125rem;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.history-coming-soon p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.history-page-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
}

.history-page-icon i {
  width: 28px;
  height: 28px;
}

.history-page-header h1 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.history-page-subtitle {
  color: #64748b;
  font-size: 0.875rem;
}

.history-page-content {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.history-login-prompt {
  text-align: center;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 200px;
}

.login-prompt-icon {
  width: 56px;
  height: 56px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #64748b;
}

.login-prompt-icon i {
  width: 28px;
  height: 28px;
}

.history-login-prompt h2 {
  font-size: 1.125rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.history-login-prompt p {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  max-width: 280px;
}

.history-login-prompt .btn {
  width: auto;
  padding: 0.875rem 2rem;
}

.session-history-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* History Filters */
.hist-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0.75rem 0.75rem 0;
  margin-bottom: 0.5rem;
}

.hist-sport-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
}

.hist-sport-tab {
  flex: 1;
  padding: 6px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.hist-sport-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hist-sport-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.hist-sport-tab.active .hist-sport-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

.hist-period-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
}

.hist-period-tab {
  flex: 1;
  padding: 7px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.hist-period-tab.active {
  background: white;
  color: #0891b2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hist-count {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Sport icon in session card */
.session-card-sport-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 10px;
}

.session-card-sport-icon img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

/* Sport badge in session detail */
.session-detail-sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ecfeff, #f0f9ff);
  border: 1px solid #cffafe;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.session-detail-sport-badge img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(41%) sepia(85%) saturate(1379%) hue-rotate(166deg) brightness(95%) contrast(101%);
}

.session-detail-sport-badge span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0891b2;
}

/* Inline sport icon in detail items */
.detail-sport-inline-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  opacity: 0.7;
}

#historyLoggedIn {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== LEADERBOARD EXTRA STYLES (main LB styles are inline in index.html) ===== */
.lb-entry-own .lb-row { background: #ecfeff; border-color: #0891b2; }

#historyLoggedIn:not(.hidden) {
  display: block;
}

.history-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  display: flex;
  flex-direction: column;
  min-width: 80px;
  font-size: 0.75rem;
}

.history-day {
  font-weight: 600;
  color: #0f172a;
}

.history-time {
  color: #94a3b8;
}

.history-details {
  flex: 1;
}

.history-spot {
  font-weight: 600;
  color: #0891b2;
  margin-bottom: 0.25rem;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.empty-history {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

.empty-history .hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}
/* ============================================
   SESSION CARDS (History List)
   ============================================ */
.session-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

/* Swipe-to-delete wrapper */
.session-card-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.session-card-content {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 1px solid #e2e8f0;
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.session-card-content:active {
  background: #f1f5f9;
}

/* Delete button behind the card */
.session-card-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 90px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: white;
  cursor: pointer;
  z-index: 1;
  border-radius: 0 0.75rem 0.75rem 0;
}

.session-card-delete span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-card-delete:active {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.session-card-delete i {
  width: 24px;
  height: 24px;
}

/* Legacy support for old .session-card class */
.session-card {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid #e2e8f0;
}

.session-card:active {
  background: #f1f5f9;
}

.session-card-info {
  flex: 1;
  min-width: 0;
}

.session-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
}

.session-card-duration {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0891b2;
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

.session-card-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}

.session-card-arrow i {
  width: 20px;
  height: 20px;
}

/* Swipe hint animation */
@keyframes swipeHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

.session-card-wrapper:first-child .session-card-content {
  /* Subtle hint animation for first card */
}

/* History page content - light theme */
.history-page-content {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#historyLoggedIn {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#historyLoggedIn:not(.hidden) {
  display: block;
}

.session-history-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Session Detail Modal */
.session-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f2f2f7;
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.session-detail-header {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.session-detail-back {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
}

.session-detail-back i {
  width: 20px;
  height: 20px;
}

.session-detail-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

/* Session Detail Tabs */
.session-detail-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 9;
}

.session-tab {
  flex: 1;
  padding: 0.875rem 0.5rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.session-tab.active {
  color: #0891b2;
  font-weight: 600;
}

.session-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: #0891b2;
  border-radius: 3px 3px 0 0;
}

.session-tab-content {
  display: none;
}

.session-tab-content.active {
  display: block;
}

.session-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  text-align: center;
}

.session-detail-placeholder i {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.session-detail-placeholder p {
  font-size: 1rem;
  margin: 0;
}

/* Statistieken Tab - App Style */
.stats-section {
  background: #ffffff;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stats-section-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0891b2;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem 0.5rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

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

.stats-label {
  color: #64748b;
  font-size: 0.95rem;
}

.stats-value {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.session-detail-content {
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.session-detail-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.session-detail-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.session-detail-location i {
  width: 20px;
  height: 20px;
  color: #0891b2;
}

.session-detail-datetime {
  color: #64748b;
  font-size: 0.9375rem;
}

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

.detail-stat {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0891b2;
  margin-bottom: 0.25rem;
}

.detail-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.session-detail-section {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.session-detail-section h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin: 0 0 0.75rem 0;
}

.session-detail-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-item-label {
  color: #64748b;
}

.detail-item-value {
  font-weight: 600;
  color: #0f172a;
}

/* ============================================
   SURFER CARDS (Active Surfers List)
   Apple Fitness Style
   ============================================ */
.surfer-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
}

.surfer-card-new {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid #e2e8f0;
}

.surfer-card-new:active {
  background: #f1f5f9;
}

.surfer-card-new.own-card {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.surfer-card-new.own-card:active {
  background: #d1fae5;
}

.surfer-card-left {
  flex: 1;
  min-width: 0;
}

.surfer-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 10px;
  border: 2px solid #e2e8f0;
}

.surfer-card-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 700;
}

.own-card .surfer-card-avatar {
  border-color: #a7f3d0;
}

.surfer-card-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0f172a;
  margin-bottom: 0.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.you-badge {
  display: inline-block;
  background: #10b981;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.surfer-card-details {
  font-size: 0.8125rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.surfer-card-spot {
  font-size: 0.75rem;
  color: #0891b2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.surfer-card-spot i {
  width: 12px;
  height: 12px;
}

.surfer-detail-item strong {
  color: #334155;
  font-weight: 600;
}

.surfer-detail-divider {
  color: #cbd5e1;
}

.surfer-card-right {
  text-align: right;
  margin-right: 0.5rem;
}

.surfer-card-speed {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0891b2;
  line-height: 1;
}

.surfer-card-speed-unit {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
}

.surfer-card-arrow {
  color: #94a3b8;
}

.surfer-card-arrow i {
  width: 20px;
  height: 20px;
}

/* Session limit notice */
.session-limit-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  color: #0369a1;
}

.session-limit-notice i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.empty-state-hint {
  font-size: 0.875rem;
  color: #64748b;
}

/* Secondary button */
.btn-secondary {
  background: #f1f5f9;
  color: #0891b2;
  margin-top: 0.5rem;
}

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

/* ============================================
   MOBILE RESPONSIVE STYLES
   Supports: iPhone SE, iPhone 12-15, Plus/Max, Android
   ============================================ */

/* Small phones (iPhone SE, small Android - 320-375px) */
@media screen and (max-width: 375px) {
  /* Sport Type Selector */
  .sport-type-selector {
    gap: 0.25rem;
    padding: 0.2rem;
  }
  
  .sport-type-btn {
    padding: 0.5rem 0.4rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }
  
  .sport-type-btn i {
    width: 0.9rem;
    height: 0.9rem;
  }
  
  .sport-type-btn .sport-icon {
    width: 20px;
    height: 20px;
  }
  
  /* Fin Type Selector */
  .fin-type-selector {
    gap: 0.2rem;
    padding: 0.15rem;
    max-width: 190px;
  }
  
  .fin-type-btn {
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
    gap: 0.2rem;
  }
  
  .fin-type-btn i {
    width: 0.8rem;
    height: 0.8rem;
  }
  
  .fin-type-btn .sport-icon {
    width: 14px;
    height: 14px;
  }
  
  /* Data Tables */
  .data-table {
    font-size: 0.75rem;
    min-width: 340px;
  }
  
  .data-table-header th {
    padding: 0.625rem 0.375rem;
    font-size: 0.625rem;
  }
  
  .data-table-body td {
    padding: 0.625rem 0.375rem;
  }
  
  .col-spot, .col-name {
    max-width: 100px;
  }
  
  .you-badge-small {
    font-size: 0.5625rem;
    padding: 0.0625rem 0.25rem;
  }
  
  /* Welcome Screen */
  .welcome-content {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }
  
  .welcome-icon {
    width: 52px;
    height: 52px;
  }
  
  .welcome-icon i {
    width: 28px;
    height: 28px;
  }
  
  .welcome-content h1 {
    font-size: 1.25rem;
  }
  
  .welcome-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .welcome-explanation h2 {
    font-size: 0.9375rem;
  }
  
  .welcome-explanation p {
    font-size: 0.8125rem;
  }
  
  .benefit-item {
    font-size: 0.8125rem;
    padding: 0.5rem;
  }
  
  .benefit-item i {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
  }
  
  /* History Page */
  .history-page-container {
    padding: 0.75rem;
  }
  
  .history-page-header h1 {
    font-size: 1.125rem;
  }
  
  .history-page-icon {
    width: 48px;
    height: 48px;
  }
  
  .history-page-icon i {
    width: 24px;
    height: 24px;
  }
  
  .history-login-prompt {
    padding: 1.5rem 1rem;
    min-height: 250px;
  }
  
  .history-login-prompt h2 {
    font-size: 1rem;
  }
  
  .history-login-prompt p {
    font-size: 0.8125rem;
  }
  
  .login-prompt-icon {
    width: 48px;
    height: 48px;
  }
  
  .login-prompt-icon i {
    width: 24px;
    height: 24px;
  }
  
  /* Settings Page */
  .settings-container {
    padding: 0.75rem;
  }
  
  .settings-card {
    padding: 1rem;
    border-radius: 1rem;
  }
  
  .settings-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .settings-icon i {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .settings-header h2 {
    font-size: 1.125rem;
  }
  
  .map-style-selector {
    gap: 0.375rem;
  }
  
  .map-style-btn {
    padding: 0.625rem;
    font-size: 0.75rem;
  }
  
  .map-style-btn i {
    width: 1rem;
    height: 1rem;
  }
  
  /* About Page */
  .about-page-container {
    padding: 0.75rem;
  }
  
  .about-page-header h1 {
    font-size: 1.25rem;
  }
  
  .about-page-icon {
    width: 52px;
    height: 52px;
  }
  
  .about-page-icon i {
    width: 28px;
    height: 28px;
  }
  
  /* List View */
  .list-container {
    padding: 0.75rem;
  }
  
  .list-header h2 {
    font-size: 1.125rem;
  }
  
  .surfer-card {
    padding: 0.875rem;
  }
  
  .surfer-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .surfer-name {
    font-size: 0.9375rem;
  }
  
  .input-half input {
    font-size: 0.9375rem;
    padding: 0.5rem 0.625rem;
  }
  
  .input-half label {
    font-size: 0.75rem;
  }
  
  /* Auth Modal */
  .auth-modal-content {
    padding: 1.5rem;
    margin: 0.75rem;
    border-radius: 1.25rem;
  }
  
  .auth-icon {
    width: 52px;
    height: 52px;
  }
  
  .auth-icon i {
    width: 26px;
    height: 26px;
  }
  
  .auth-header h2 {
    font-size: 1.25rem;
  }
  
  /* Header */
  .header-title h1 {
    font-size: 1.125rem;
  }
  
  .header-title .subtitle {
    font-size: 0.6875rem;
  }
  
  .icon-large {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Standard phones (iPhone 12-15, most Android - 376-428px) */
@media screen and (min-width: 376px) and (max-width: 428px) {
  .welcome-content {
    padding: 1.5rem;
  }
  
  .history-login-prompt {
    min-height: 280px;
  }
  
  .settings-container {
    padding: 1rem;
  }
  
  .about-page-container {
    padding: 1rem;
  }
  
  .list-container {
    padding: 1rem;
  }
}

/* Large phones (iPhone Plus/Max, large Android - 429-640px) */
@media screen and (min-width: 429px) and (max-width: 640px) {
  .history-page-container {
    padding: 1.25rem;
  }
  
  .history-login-prompt {
    min-height: 320px;
  }
  
  .settings-container {
    padding: 1.25rem;
  }
}

/* Short screens (landscape or small height - under 667px) */
@media screen and (max-height: 667px) {
  /* Welcome Screen */
  .welcome-screen {
    padding: 1rem 0.75rem;
    align-items: flex-start;
  }
  
  .welcome-content {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .welcome-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  
  .welcome-icon i {
    width: 24px;
    height: 24px;
  }
  
  .welcome-content h1 {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
  }
  
  .welcome-subtitle {
    margin-bottom: 0.75rem;
  }
  
  .welcome-explanation {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .welcome-benefits {
    gap: 0.25rem;
  }
  
  .benefit-item {
    padding: 0.375rem 0.5rem;
  }
  
  /* History Page - Landscape */
  .history-page-container {
    padding: 0.5rem;
    height: 100%;
  }
  
  .history-page-header-compact {
    margin-bottom: 0.5rem;
  }
  
  .history-page-icon-small {
    width: 28px;
    height: 28px;
  }
  
  .history-page-icon-small i {
    width: 14px;
    height: 14px;
  }
  
  .history-page-header-compact h1 {
    font-size: 1rem;
  }
  
  .history-page-content {
    border-radius: 0.75rem;
  }
  
  .history-login-prompt {
    padding: 1rem;
    min-height: auto;
  }
  
  .login-prompt-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.5rem;
  }
  
  .login-prompt-icon i {
    width: 18px;
    height: 18px;
  }
  
  .history-login-prompt h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .history-login-prompt p {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
  }
  
  .history-login-prompt .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  /* Data table in landscape */
  .data-table {
    font-size: 0.75rem;
  }
  
  .data-table-header th {
    padding: 0.5rem 0.375rem;
    font-size: 0.625rem;
  }
  
  .data-table-body td {
    padding: 0.5rem 0.375rem;
  }
  
  .history-page-header {
    margin-bottom: 1rem;
  }
  
  .history-page-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
  }
  
  .history-page-icon i {
    width: 22px;
    height: 22px;
  }
  
  /* About Page */
  .about-page-header {
    margin-bottom: 1rem;
  }
  
  .about-page-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }
  
  .about-page-section {
    margin-bottom: 1rem;
  }
  
  /* Settings */
  .settings-section {
    margin: 1rem 0;
  }
}

/* Very short screens (under 568px height - iPhone SE landscape) */
@media screen and (max-height: 568px) {
  .welcome-screen {
    padding: 0.5rem;
  }
  
  .welcome-content {
    padding: 0.875rem;
  }
  
  .welcome-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.375rem;
  }
  
  .welcome-icon i {
    width: 20px;
    height: 20px;
  }
  
  .welcome-content h1 {
    font-size: 1rem;
  }
  
  .welcome-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .welcome-explanation {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .welcome-explanation h2 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .welcome-explanation p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .benefit-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .btn-large {
    padding: 0.75rem;
    font-size: 1rem;
  }
}
/* ============================================
   SHARING STARTED SCREEN
   ============================================ */
.sharing-started-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
}

.sharing-started-modal.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.sharing-started-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sharing-started-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.sharing-started-karma {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0891b2;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.sharing-started-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

.sharing-started-tap {
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Safe area support for iOS */
@supports (padding: max(0px)) {
  .header-content {
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .history-page-container,
  .settings-container,
  .about-page-container,
  .list-container {
    padding-bottom: max(1rem, calc(env(safe-area-inset-bottom) + 1rem));
  }
  
  .welcome-screen {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
  
  .auth-modal {
    padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }
}
/* Surfer Detail Modal (vanuit realtime lijst) */
.surfer-detail-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.surfer-detail-card {
  background: white; border-radius: 1rem; padding: 1.5rem;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.surfer-detail-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.surfer-detail-top h2 {
  font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0;
  display: flex; align-items: center; gap: 0.5rem;
}
.surfer-detail-close {
  background: #f1f5f9; border: none; border-radius: 8px;
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: #64748b;
}
.surfer-detail-close i { width: 18px; height: 18px; }
.surfer-detail-spot {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; color: #0891b2; margin-bottom: 1rem;
}
.surfer-detail-spot i { width: 14px; height: 14px; }
.surfer-detail-gear-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 1rem 0; margin-bottom: 0.75rem;
  border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
}
.surfer-detail-gear-item { text-align: center; }
.surfer-detail-gear-value {
  font-size: 1.75rem; font-weight: 700; color: #0891b2; line-height: 1;
}
.surfer-detail-gear-label {
  font-size: 0.75rem; color: #64748b; margin-top: 2px;
}
.surfer-detail-gear-divider {
  width: 1px; height: 40px; background: #e2e8f0;
}
.surfer-detail-rows { margin-bottom: 1rem; }
.surfer-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f8fafc;
}
.surfer-detail-row:last-child { border-bottom: none; }
.surfer-detail-row-label { font-size: 0.8125rem; color: #64748b; }
.surfer-detail-row-value { font-size: 0.8125rem; color: #1e293b; font-weight: 600; }
.surfer-detail-map-btn { width: 100%; justify-content: center; }

/* Loading spinner animation */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   PWA STANDALONE MODE - Compact layout
   Actief wanneer app op beginscherm staat
   ============================================ */
@media (display-mode: standalone) {
  /* Compactere header */
  .header-content {
    padding: 0.5rem 0.85rem;
    min-height: 2.75rem;
  }
  
  .header-title h1 {
    font-size: 1.1rem;
  }
  
  .header-title .subtitle {
    font-size: 0.65rem;
  }
  
  .header-title {
    gap: 0.5rem;
  }
  
  .icon-large {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .header-auth-btn,
  .header-menu-btn {
    width: 34px;
    height: 34px;
  }
  
  .header-auth-btn svg,
  .header-menu-btn svg {
    width: 17px;
    height: 17px;
  }
  
  .header-actions {
    gap: 0.35rem;
  }
  
  /* Compactere zoekbalk */
  .surfspot-search {
    padding: 0 0.85rem 0.5rem;
  }
  
  .search-input {
    padding: 0.5rem 2.5rem;
    font-size: 0.875rem;
    border-radius: 0.75rem;
  }
  
  .search-icon {
    left: 0.75rem;
    width: 1rem;
    height: 1rem;
  }
  
  /* Tab bar — geen safe-area override nodig, hoofddefinitie is correct */
  .bottom-tab-bar {
    overflow: visible;
  }
  
  /* Badge moet boven alles staan */
  .tab-badge {
    z-index: 10;
  }
  
  .tab-bar-item {
    padding: 5px 0 3px;
    gap: 1px;
    overflow: visible;
  }
  
  .tab-bar-item i,
  .tab-bar-item svg {
    width: 20px;
    height: 20px;
  }
  
  .tab-bar-item span {
    font-size: 0.625rem;
  }
  
  /* Floating elementen — aangepast aan compactere tab bar */
  .session-setup-trigger {
    bottom: calc(56px + env(safe-area-inset-bottom, 8px) + 6px) !important;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* ============================================
   KLEINE SCHERMEN (iPhone SE/8, 375px breed, ≤700px hoog)
   Compact ongeacht PWA of browser
   ============================================ */
@media (max-height: 700px) {
  .header-content {
    padding: 0.5rem 0.85rem;
    min-height: 2.5rem;
  }
  
  .header-title h1 {
    font-size: 1.05rem;
  }
  
  .header-title .subtitle {
    font-size: 0.6rem;
  }
  
  .icon-large {
    width: 1.4rem;
    height: 1.4rem;
  }
  
  .header-auth-btn,
  .header-menu-btn {
    width: 32px;
    height: 32px;
  }
  
  .header-auth-btn svg,
  .header-menu-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .surfspot-search {
    padding: 0 0.75rem 0.4rem;
  }
  
  .search-input {
    padding: 0.45rem 2.25rem;
    font-size: 0.85rem;
  }
  
  .tab-bar-item {
    padding: 5px 0 3px;
    gap: 1px;
  }
  
  .tab-bar-item i,
  .tab-bar-item svg {
    width: 19px;
    height: 19px;
  }
  
  .tab-bar-item span {
    font-size: 0.6rem;
  }
  
  .session-setup-trigger {
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    bottom: calc(42px + env(safe-area-inset-bottom, 2px) + 8px);
  }
}

/* ============================================
   KLEINE SCHERMEN + STANDALONE gecombineerd
   ============================================ */
@media (display-mode: standalone) and (max-height: 700px) {
  .session-setup-trigger {
    bottom: calc(36px + 8px);
  }
}

/* ============================================
   HELE KLEINE SCHERMEN (iPhone SE 1st gen, ≤570px)
   ============================================ */
@media (max-height: 570px) {
  .header-content {
    padding: 0.35rem 0.75rem;
    min-height: 2.25rem;
  }
  
  .header-title .subtitle {
    display: none;
  }
  
  .surfspot-search {
    padding: 0 0.75rem 0.35rem;
  }
  
  .search-input {
    padding: 0.4rem 2rem;
    font-size: 0.8rem;
  }
  
  .tab-bar-item {
    padding: 4px 0 2px;
  }
  
  .tab-bar-item span {
    font-size: 0.55rem;
  }
}

/* ============================================
   TAB BAR - SEPARATOR & DROPDOWN
   ============================================ */

.tab-bar-separator {
  width: 1px;
  background: #e2e8f0;
  margin: 8px 0;
  flex-shrink: 0;
}

.tab-bar-wind.active {
  color: #0284c7 !important;
}

.tab-bar-wind.active::before {
  background: #0284c7 !important;
}

/* Lijst dropdown submenu */
.tab-dropdown {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 8px) + 8px);
  left: 50px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  min-width: 170px;
  z-index: 5000;
  overflow: hidden;
}

.tab-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tab-dropdown-item:active {
  background: #f1f5f9;
}

.tab-dropdown-item i {
  width: 18px;
  height: 18px;
  color: #0891b2;
}

.tab-dropdown-item + .tab-dropdown-item {
  border-top: 1px solid #f1f5f9;
}

/* ============================================
   WIND FORECAST VIEW
   ============================================ */

.wind-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8fafc;
}

/* Wind view tab toggle */
.wind-view-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.wind-view-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.wind-view-tab.active {
  background: #0f172a;
  color: white;
}
.wind-view-tab:active { opacity: 0.8; }

/* Wind forecast panel */
.wind-forecast-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Wind map panel */
.wind-map-panel {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.wind-map-panel.hidden { display: none; }
.wind-map-leaflet {
  width: 100%;
  height: 100%;
  background: #e8ecf0;
}

/* Wind map loading overlay */
.wind-map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 800;
  color: #64748b;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  padding: 20px 28px;
  border-radius: 14px;
}
.wind-map-loading.hidden { display: none; }

/* Wind map legend */
.wind-map-legend {
  position: absolute;
  bottom: 20px;
  left: 12px;
  right: 12px;
  z-index: 800;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 8px 12px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.wind-map-legend-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right,
    rgb(180,170,210) 0%,
    rgb(155,140,200) 6%,
    rgb(130,120,195) 12%,
    rgb(90,130,210) 18%,
    rgb(30,175,195) 26%,
    rgb(56,168,56) 36%,
    rgb(154,187,44) 46%,
    rgb(232,200,0) 56%,
    rgb(255,140,0) 66%,
    rgb(220,50,0) 76%,
    rgb(170,10,30) 86%,
    rgb(130,0,70) 93%,
    rgb(102,0,102) 100%
  );
}
.wind-map-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  color: #475569;
  font-weight: 600;
}

/* Wind map live badge */
.wind-map-live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 800;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 0 10px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  pointer-events: none;
}
.wind-map-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Wind map refresh button */
.wind-map-refresh {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 800;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  -webkit-tap-highlight-color: transparent;
}
.wind-map-refresh:active { background: rgba(240, 240, 240, 1); }
.wind-map-refresh.loading i { animation: spin 1s linear infinite; }

/* KNMI station markers on wind map */
.knmi-map-marker {
  background: none !important;
  border: none !important;
  z-index: 500 !important;
}
.knmi-map-marker-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 1);
  border: 2.5px solid #0891b2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0891b2;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.knmi-map-marker-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

/* Force Leaflet interactive panes above wind canvas overlays */
#windMapLeaflet .leaflet-marker-pane { z-index: 600 !important; }
#windMapLeaflet .leaflet-popup-pane { z-index: 700 !important; }

/* KNMI custom popup on wind map (sits on container, above canvases) */
.knmi-custom-popup {
  position: absolute;
  z-index: 500;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  animation: popupFadeIn 0.15s ease-out;
}
@keyframes popupFadeIn { from { opacity: 0; transform: translate(-50%, -100%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }

.knmi-custom-popup-content {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 180px;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.knmi-custom-popup-tip {
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  margin: -6px auto 0;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.06);
}
.knmi-custom-popup-close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.knmi-custom-popup-close:hover { color: #334155; }

.knmi-popup-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #0f172a;
  margin-bottom: 8px;
  padding-right: 16px;
}
.knmi-popup-type {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 400;
  margin-left: auto;
}
.knmi-popup-wind {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.knmi-popup-speed {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.knmi-popup-unit {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
.knmi-popup-bft {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}
.knmi-popup-gust {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: auto;
}
.knmi-popup-dir {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 8px;
}
.knmi-popup-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: auto;
}
.knmi-popup-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}
.knmi-popup-source {
  font-size: 0.65rem;
  color: #b0b8c4;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spot bar (visible when forecast shown) */
.wind-spot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.wind-spot-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 10px;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.wind-spot-back:active { background: #e2e8f0; }

.wind-spot-bar-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.wind-spot-bar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wind-spot-change {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 10px;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.wind-spot-change:active { background: #e2e8f0; }

/* Spot list container (like chat spot list) */
.wind-spot-list-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.wind-spot-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 8px;
}

.wind-spot-list-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.wind-spot-search {
  position: relative;
  padding: 0 12px 8px;
}

.wind-spot-search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-70%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.wind-spot-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
  color: #1e293b;
  background: white;
  outline: none;
  box-sizing: border-box;
}

.wind-spot-search input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 2px rgba(8,145,178,0.15);
}

.wind-spot-search input::placeholder { color: #94a3b8; }

.wind-spot-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 2rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wind-spot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
}

.wind-spot-item:active { border-color: #0891b2; background: #f0fdfa; }

.wind-spot-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.wind-spot-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wind-spot-item-prov {
  font-size: 0.75rem;
  color: #94a3b8;
}

.wind-spot-item-arrow {
  width: 16px;
  height: 16px;
  color: #cbd5e1;
}

/* Wind content (forecast) */
.wind-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wind-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.wind-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.wind-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0891b2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* KNMI Live Measurement Block */
.knmi-measurement {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f7fa 100%);
  border: 1px solid #99f0e0;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0 4px 0;
}

.knmi-measurement-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.knmi-station-info {
  font-weight: 400;
  color: #6b7280;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}

.knmi-measurement-data {
  display: flex;
  align-items: center;
  gap: 16px;
}

.knmi-wind-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.knmi-wind-value {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
}

.knmi-wind-unit {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.knmi-gust {
  font-size: 12px;
  color: #64748b;
  margin-left: 4px;
}

.knmi-wind-dir {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.knmi-time {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
}

.knmi-measurement {
  cursor: pointer;
}

.knmi-chevron {
  color: #9ca3af;
}

.knmi-detail-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ccf0e8;
}

.knmi-detail-row {
  margin-bottom: 10px;
}

.knmi-detail-row:last-child {
  margin-bottom: 0;
}

.knmi-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.knmi-detail-value {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.knmi-detail-hint {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 2px;
}

.knmi-diff {
  font-weight: 600;
  font-size: 12px;
  margin-left: 4px;
}

.knmi-detail-source {
  font-size: 11px;
  color: #9ca3af;
  padding-top: 6px;
  border-top: 1px solid #e0f2f1;
}

/* Day header */
.wind-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: white;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  border-top: 3px solid #3b82f6;
  margin-top: 4px;
}

.wind-day-header.today {
  background: white;
  color: #0891b2;
  border-top: 3px solid #0891b2;
  border-bottom: 1px solid #e2e8f0;
}

.wind-day-header:first-child {
  margin-top: 0;
}

.wind-day-label {
  flex: 1;
}

.wind-info-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #334155;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.wind-day-header.today .wind-info-btn { color: #0891b2; }
.wind-info-btn i, .wind-info-btn svg { width: 18px; height: 18px; stroke-width: 2.5; }

/* Wind info popup overlay */
.wind-info-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wind-info-popup-content {
  background: white;
  border-radius: 16px;
  max-width: 340px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.wind-info-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}
.wind-info-popup-header button {
  background: none; border: none; color: white;
  cursor: pointer; padding: 2px; display: flex;
}
.wind-info-popup-header button i,
.wind-info-popup-header button svg { width: 18px; height: 18px; }
.wind-info-popup-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wind-info-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.wind-info-icon {
  width: 20px; height: 20px;
  color: #0891b2;
  flex-shrink: 0;
  margin-top: 2px;
}
.wind-info-row strong {
  font-size: 0.85rem;
  color: #0f172a;
}
.wind-info-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}
.wind-info-tip {
  font-size: 0.75rem;
  color: #64748b;
  background: #f0fdfa;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #99f6e4;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.wind-info-tip i, .wind-info-tip svg {
  width: 14px; height: 14px;
  color: #0891b2;
  flex-shrink: 0;
}

.wind-info-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 12px 0;
}

.wind-info-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0d9488;
  margin-bottom: 8px;
}

/* Forecast table header */
.wind-table-header {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 26px 50px 30px;
  gap: 4px;
  align-items: center;
  padding: 6px 12px;
  background: white;
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent;
  position: sticky;
  top: 0;
  z-index: 12;
}

.wind-table-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Forecast row */
.wind-row {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 26px 50px 30px;
  gap: 4px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  border-left: 3px solid transparent;
  transition: background 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wind-row:active { opacity: 0.85; }

/* Time column */
.wind-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

/* Wind speed cell */
.wind-speed-cell {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.wind-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wind-speed-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.wind-speed-unit {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.wind-gust {
  font-size: 0.75rem;
  color: #64748b;
}

/* Weather icon (QWeather Icons font) */
.wind-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}
.wind-hourly-row .wind-weather {
  font-size: 18px;
}

/* Wind direction */
.wind-direction {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.wind-dir-arrow {
  width: 16px;
  height: 16px;
  color: #475569;
  flex-shrink: 0;
}

.wind-dir-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.wind-temp {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

/* Wind color scale: 11 stappen — paars → blauw → cyaan → groen → geel → oranje → rood → donkerrood */
.wind-color-0  { background: #9e8cc8; }    /* 0-5 kts - nauwelijks (lavendel) */
.wind-color-1  { background: #7b6db8; }    /* 6-9 kts - licht (paars) */
.wind-color-2  { background: #5a82d2; }    /* 10-13 kts - matig (blauw-paars) */
.wind-color-3  { background: #1eafc3; }    /* 14-17 kts - aardig (cyaan) */
.wind-color-4  { background: #38a838; }    /* 18-21 kts - goed (groen) */
.wind-color-5  { background: #9abb2c; }    /* 22-25 kts - sterk (geelgroen) */
.wind-color-6  { background: #e8c800; }    /* 26-29 kts - zeer sterk (geel) */
.wind-color-7  { background: #ff8c00; }    /* 30-33 kts - waarschuwing (oranje) */
.wind-color-8  { background: #dd3300; }    /* 34-39 kts - storm (rood) */
.wind-color-9  { background: #aa1133; }    /* 40-47 kts - zware storm (donkerrood) */
.wind-color-10 { background: #660066; }    /* 48+ kts - extreem (paars) */

/* Row backgrounds */
.wind-row-bg-0  { background: white; }
.wind-row-bg-1  { background: #eee8f5; }
.wind-row-bg-2  { background: #e4dff0; }
.wind-row-bg-3  { background: #dff0f5; }
.wind-row-bg-4  { background: #e2f5e5; }
.wind-row-bg-5  { background: #f0f5dd; }
.wind-row-bg-6  { background: #fdf8da; }
.wind-row-bg-7  { background: #fff0d9; }
.wind-row-bg-8  { background: #fde4d9; }
.wind-row-bg-9  { background: #f9d9d9; }
.wind-row-bg-10 { background: #f0d0e0; }

/* Left color accent per row */
.wind-row-bg-1  { border-left: 3px solid #7b6db8; }
.wind-row-bg-2  { border-left: 3px solid #5a82d2; }
.wind-row-bg-3  { border-left: 3px solid #1eafc3; }
.wind-row-bg-4  { border-left: 3px solid #38a838; }
.wind-row-bg-5  { border-left: 3px solid #9abb2c; }
.wind-row-bg-6  { border-left: 3px solid #e8c800; }
.wind-row-bg-7  { border-left: 3px solid #ff8c00; }
.wind-row-bg-8  { border-left: 3px solid #dd3300; }
.wind-row-bg-9  { border-left: 3px solid #aa1133; }
.wind-row-bg-10 { border-left: 3px solid #660066; }

/* Wind speed value text color per level */
.wind-row-bg-3  .wind-speed-value { color: #0e7490; font-weight: 800; }
.wind-row-bg-4  .wind-speed-value { color: #14532d; font-weight: 800; }
.wind-row-bg-5  .wind-speed-value { color: #4d5c0a; font-weight: 800; }
.wind-row-bg-6  .wind-speed-value { color: #7a6800; font-weight: 800; }
.wind-row-bg-7  .wind-speed-value { color: #9a4600; font-weight: 800; }
.wind-row-bg-8  .wind-speed-value { color: #991b1b; font-weight: 800; }
.wind-row-bg-9  .wind-speed-value { color: #7f1d1d; font-weight: 800; }
.wind-row-bg-10 .wind-speed-value { color: #4a0033; font-weight: 800; }

/* Text colors on tinted rows — cyan/green */
.wind-row-bg-3 .wind-time { color: #0e7490; }
.wind-row-bg-4 .wind-time { color: #14532d; }
.wind-row-bg-5 .wind-time { color: #4d5c0a; }

.wind-row-bg-3 .wind-gust { color: #0e7490; }
.wind-row-bg-4 .wind-gust { color: #166534; }
.wind-row-bg-5 .wind-gust { color: #4d5c0a; }

.wind-row-bg-3 .wind-dir-text,
.wind-row-bg-3 .wind-dir-arrow { color: #0e7490; }
.wind-row-bg-4 .wind-dir-text,
.wind-row-bg-4 .wind-dir-arrow { color: #166534; }
.wind-row-bg-5 .wind-dir-text,
.wind-row-bg-5 .wind-dir-arrow { color: #4d5c0a; }

.wind-row-bg-3 .wind-temp { color: #0e7490; }
.wind-row-bg-4 .wind-temp { color: #14532d; }
.wind-row-bg-5 .wind-temp { color: #4d5c0a; }

/* Text colors on tinted rows — yellow/orange/red/extreme */
.wind-row-bg-6 .wind-time { color: #7a6800; }
.wind-row-bg-7 .wind-time { color: #7c2d12; }
.wind-row-bg-8 .wind-time,
.wind-row-bg-9 .wind-time,
.wind-row-bg-10 .wind-time { color: #7f1d1d; }

.wind-row-bg-7 .wind-gust { color: #854d0e; }
.wind-row-bg-8 .wind-gust { color: #9a3412; }
.wind-row-bg-9 .wind-gust,
.wind-row-bg-10 .wind-gust { color: #991b1b; }

.wind-row-bg-7 .wind-dir-text,
.wind-row-bg-7 .wind-dir-arrow { color: #854d0e; }
.wind-row-bg-8 .wind-dir-text,
.wind-row-bg-8 .wind-dir-arrow { color: #9a3412; }
.wind-row-bg-9 .wind-dir-text,
.wind-row-bg-9 .wind-dir-arrow,
.wind-row-bg-10 .wind-dir-text,
.wind-row-bg-10 .wind-dir-arrow { color: #7f1d1d; }

.wind-row-bg-7 .wind-temp { color: #713f12; }
.wind-row-bg-8 .wind-temp { color: #7c2d12; }
.wind-row-bg-9 .wind-temp,
.wind-row-bg-10 .wind-temp { color: #7f1d1d; }

/* Hourly detail expansion */
.wind-hourly-detail {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
  animation: windFadeIn 0.15s ease-out;
}

@keyframes windFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wind-hourly-row {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 26px 50px 30px;
  gap: 4px;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid #e2e8f0;
}

.wind-hourly-row .wind-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.wind-hourly-row .wind-speed-value {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Attribution */
.wind-spot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
}

/* Wind button in spot popup */
.surfspot-wind-btn {
  background: #0284c7;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.surfspot-wind-btn i { width: 14px; height: 14px; }
.surfspot-wind-btn:active { opacity: 0.8; }

/* V42: Mid Aspect card gradient */
.calc-result-mid {
  background: linear-gradient(135deg, #0d6960 0%, #14b8a6 100%);
}

/* ============================================
   VIN & FOIL CALCULATOR
   ============================================ */

.calc-field {
  margin-bottom: 0.75rem;
}

.calc-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.375rem;
}

.calc-select,
.calc-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  background: #f8fafc;
  color: #0f172a;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.calc-select:focus,
.calc-input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.calc-btn-row {
  display: flex;
  gap: 0.375rem;
}

.calc-btn {
  flex: 1;
  padding: 0.625rem 0.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.625rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}

.calc-btn.active {
  border-color: #0891b2;
  background: #ecfeff;
  color: #0891b2;
  box-shadow: inset 0 0 0 1px #0891b2;
}

.calc-btn:active {
  transform: scale(0.97);
}

.calc-weed-toggle {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #f0f7e6;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid #c5e1a5;
  margin-bottom: 0.75rem;
}

.calc-weed-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #689f38;
}

.calc-weed-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #558b2f;
  cursor: pointer;
  margin: 0;
}

.calc-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.8125rem;
  color: #92400e;
  margin-bottom: 1rem;
}

.calc-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin: 1rem 0;
}

.calc-result-card {
  padding: 1.25rem 0.75rem;
  border-radius: 1rem;
  color: white;
  text-align: center;
}

.calc-result-std {
  background: linear-gradient(135deg, #0f766e 0%, #2dd4bf 100%);
}

.calc-result-perf {
  background: linear-gradient(135deg, #115e59 0%, #0d9488 100%);
}

.calc-result-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.calc-result-value {
  margin: 0.375rem 0;
  line-height: 1;
}

.calc-result-value span:first-child {
  font-size: 2.75rem;
  font-weight: 900;
}

.calc-result-unit {
  font-size: 1.25rem;
  font-weight: 800;
  margin-left: 2px;
}

.calc-result-sub {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  display: inline-block;
  margin-top: 0.375rem;
}

.calc-disclaimer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: #f1f5f9;
  border-radius: 0.625rem;
  padding: 0.75rem;
  margin-top: 1rem;
}

.calc-disclaimer p {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.calc-disclaimer i {
  color: #94a3b8;
}

/* Calculator responsive: small phones */
@media (max-width: 359px) {
  .calc-results {
    grid-template-columns: 1fr;
  }
  .calc-result-value span:first-child {
    font-size: 2.25rem;
  }
  .calc-btn {
    font-size: 0.625rem;
    padding: 0.5rem 0.125rem;
  }
}

/* ============================================
   TABLET & DESKTOP LAYOUT
   App-frame centered on larger screens
   ============================================ */

/* Shared: all screens >= 768px (iPad + desktop) */
@media screen and (min-width: 768px) {
  body {
    background: #0f172a;
    display: flex;
    justify-content: center;
  }
  
  .app-container {
    max-width: 500px;
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, #ecfeff 0%, #dbeafe 100%);
    box-shadow: 0 0 80px rgba(8, 145, 178, 0.15), 0 0 0 1px rgba(255,255,255,0.06);
  }
  
  /* All full-screen overlays: constrain to app width */
  .welcome-screen,
  .session-setup-page,
  .summary-modal,
  .auth-modal,
  .session-detail-modal,
  .sharing-started-modal,
  .surfer-detail-overlay,
  .wind-info-popup,
  .stop-session-modal {
    max-width: 500px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 100%;
  }
  
  /* FAB buttons: keep inside app frame */
  .active-session-fab {
    right: calc(50vw - 250px + 16px) !important;
  }
}

/* Desktop (laptops & monitors): phone-frame look */
@media screen and (min-width: 1024px) {
  .app-container {
    max-width: 480px;
    border-radius: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    height: calc(100vh - 3rem);
    height: calc(100dvh - 3rem);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.08);
  }
  
  .header {
    border-radius: 1.25rem 1.25rem 0 0;
  }
  
  .bottom-tab-bar {
    border-radius: 0 0 1.25rem 1.25rem;
    padding-bottom: 8px;
  }
  
  /* Overlays match the phone frame */
  .welcome-screen,
  .session-setup-page,
  .summary-modal,
  .auth-modal,
  .session-detail-modal,
  .sharing-started-modal,
  .surfer-detail-overlay,
  .wind-info-popup,
  .stop-session-modal {
    max-width: 480px;
    border-radius: 1.25rem;
    overflow: hidden;
  }
  
  .active-session-fab {
    right: calc(50vw - 240px + 16px) !important;
    bottom: calc(56px + 8px + 60px + 1.5rem) !important;
  }
  
  .session-setup-trigger {
    bottom: calc(56px + 8px + 14px + 1.5rem) !important;
  }
}

/* Wide desktop: branding beside the app frame */
@media screen and (min-width: 1280px) {
  body::before {
    content: 'RigSize Live';
    position: fixed;
    top: 50%;
    left: calc(50% - 310px);
    transform: translate(-100%, -50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
    pointer-events: none;
  }

  body::after {
    content: 'Share rigsizes, good surfkarma';
    position: fixed;
    top: calc(50% + 2.25rem);
    left: calc(50% - 310px);
    transform: translate(-100%, -50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.2);
    pointer-events: none;
  }
}
