/* Farm-to-Freight map auth gate — sign-in / sign-up form styling for
   producer + driver accounts. Extracted from MapAuthGate.jsx
   (2026-08-30) so the component can stay focused on auth flow logic. */
.map-auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.map-background-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.map-background-map {
  width: 100%;
  height: 100%;
}

.map-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(10, 15, 26, 0.4);
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  max-height: 90vh;
  overflow-y: auto;
}

.back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header.compact {
  margin-bottom: 20px;
  padding-top: 10px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
}

.logo-icon.small {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.logo-icon.user { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.logo-icon.producer { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.logo-icon.admin { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.auth-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.auth-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.user-type-selection { margin-top: 16px; }

.type-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
  text-align: left;
}

.type-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.type-card.user-type:hover { border-color: rgba(59, 130, 246, 0.4); }
.type-card.producer-type:hover { border-color: rgba(34, 197, 94, 0.4); }
.type-card.admin-type:hover { border-color: rgba(245, 158, 11, 0.4); }

.type-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-type .type-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.producer-type .type-icon { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.admin-type .type-icon, .type-icon.admin { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.type-info { flex: 1 1; min-width: 0; }
.type-info h2 { font-size: 0.9rem; font-weight: 600; color: white; margin-bottom: 2px; }
.type-info p { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.type-card .arrow { color: rgba(255, 255, 255, 0.3); flex-shrink: 0; }

.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.alert.error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }
.alert.success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; }

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 12px;
  transition: all 0.2s;
}

.input-wrapper:focus-within { border-color: rgba(34, 197, 94, 0.5); background: rgba(255, 255, 255, 0.08); }
.input-wrapper svg { color: rgba(255, 255, 255, 0.4); flex-shrink: 0; }
.input-wrapper input { flex: 1 1; background: none; border: none; outline: none; color: white; font-size: 0.9rem; padding: 12px 0; min-width: 0; }
.input-wrapper input::placeholder { color: rgba(255, 255, 255, 0.3); }

.toggle-password { background: none; border: none; cursor: pointer; padding: 4px; color: rgba(255, 255, 255, 0.4); }
.toggle-password:hover { color: rgba(255, 255, 255, 0.7); }

.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}

.submit-btn.producer { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.submit-btn.admin { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.submit-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
.submit-btn.producer:hover:not(:disabled) { box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3); }
.submit-btn.admin:hover:not(:disabled) { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.auth-switch { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.auth-switch p { color: rgba(255, 255, 255, 0.5); font-size: 0.8rem; }
.auth-switch button { background: none; border: none; color: #60a5fa; cursor: pointer; font-weight: 600; font-size: 0.8rem; }
.auth-switch button:hover { text-decoration: underline; }

.producer-options { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.magic-link-btn { color: #4ade80; text-decoration: none; font-weight: 600; font-size: 0.8rem; }
.magic-link-btn:hover { text-decoration: underline; }

.auth-footer { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.auth-footer p { color: rgba(255, 255, 255, 0.5); font-size: 0.8rem; }
.auth-footer a { color: #4ade80; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-modal { max-width: calc(100% - 32px); padding: 24px 20px; margin: 16px; }
  .auth-header h1 { font-size: 1.25rem; }
  .type-card { padding: 12px; }
  .type-icon { width: 38px; height: 38px; }
}

.farm-to-freight-page {
  min-height: 100vh;
  height: 100vh;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Site Navigation Bar - Matches main site header */
.ftf-site-nav {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1000;
}

.ftf-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ftf-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.ftf-logo-img {
  height: 42px;
  width: auto;
}

.ftf-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hhc-blue);
  display: none;
}

@media (min-width: 1100px) {
  .ftf-logo-text {
    display: block;
  }
}

.ftf-nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 900px) {
  .ftf-nav-links {
    display: flex;
  }
}

.ftf-nav-link {
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ftf-nav-link:hover {
  color: var(--hhc-blue);
  background: var(--surface-elevated);
}

.ftf-nav-link.active {
  color: var(--hhc-forest);
  background: color-mix(in srgb, var(--success) 18%, transparent);
  font-weight: 600;
}

.ftf-nav-cta {
  display: none;
}

@media (min-width: 900px) {
  .ftf-nav-cta {
    display: block;
  }
}

.ftf-portal-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--hhc-blue) 0%, var(--hhc-blue-700) 100%);
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ftf-portal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.ftf-mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: none;
  border: none;
  color: var(--hhc-blue);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.ftf-mobile-menu-btn:hover {
  background: var(--surface-elevated);
}

@media (min-width: 900px) {
  .ftf-mobile-menu-btn {
    display: none;
  }
}

.ftf-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

.ftf-mobile-link {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.ftf-mobile-link:hover {
  background: var(--surface-elevated);
  color: var(--hhc-blue);
}

.ftf-mobile-link.active {
  color: var(--hhc-forest);
  background: color-mix(in srgb, var(--success) 18%, transparent);
  font-weight: 600;
}

.ftf-mobile-link.portal {
  margin: 8px 16px 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--hhc-blue) 0%, var(--hhc-blue-700) 100%);
  color: white;
  border-radius: 25px;
  text-align: center;
  font-weight: 600;
}

.ftf-mobile-link.portal:hover {
  background: linear-gradient(135deg, var(--hhc-blue-700) 0%, var(--hhc-blue) 100%);
}

/* Auth Buttons in Nav */
.ftf-nav-cta {
  display: none;
  align-items: center;
  gap: 12px;
}

@media (min-width: 900px) {
  .ftf-nav-cta {
    display: flex;
  }
}

.ftf-login-btn, .ftf-signup-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.ftf-login-btn {
  background: rgba(30, 58, 95, 0.1);
  color: var(--hhc-blue);
}

.ftf-login-btn:hover {
  background: rgba(30, 58, 95, 0.15);
}

.ftf-signup-btn {
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  color: white;
}

.ftf-signup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.ftf-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ftf-user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--hhc-forest);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.ftf-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.ftf-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Mobile Auth Links */
.ftf-mobile-link.auth {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.ftf-mobile-link.auth.signup {
  margin: 8px 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  color: white;
  border-radius: 25px;
  justify-content: center;
  width: auto;
}

.ftf-mobile-link.logout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--danger);
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ftf-mobile-link.delete-account {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--danger);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  opacity: 0.8;
}

.ftf-mobile-link.delete-account:hover {
  opacity: 1;
}

.ftf-mobile-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  color: var(--hhc-forest);
  font-weight: 600;
  background: rgba(34, 197, 94, 0.1);
}

/* Verification Banner */
.verification-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.verification-banner button {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.verification-banner button:hover {
  background: rgba(255,255,255,0.3);
}

/* Farm to Freight Header */
.ftf-header {
  background: linear-gradient(135deg, #1a472a 0%, var(--hhc-forest) 100%);
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.ftf-header-content {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ftf-branding h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0;
}

.ftf-branding p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin: 4px 0 0;
}

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

.producer-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.producer-login-btn:hover {
  background: rgba(255,255,255,0.15);
}

.list-farm-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warning);
  color: #1a1a1a;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.list-farm-btn:hover {
  background: var(--warning);
  transform: translateY(-1px);
}

.ftf-main {
  flex: 1 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.ftf-sidebar {
  width: 420px;
  min-width: 420px;
  background: #0f172a;
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.route-panel {
  padding: 20px;
  background: linear-gradient(180deg, var(--hhc-blue) 0%, var(--surface) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.route-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.route-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
}

.input-group input::placeholder {
  color: rgba(255,255,255,0.4);
}

.input-group input:focus {
  outline: none;
  border-color: var(--success);
  background: rgba(255,255,255,0.15);
}

.truck-settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.truck-settings-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.truck-settings-toggle .rotated {
  transform: rotate(180deg);
}

.truck-settings {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.setting-row label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.setting-row input[type="number"] {
  width: 80px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: white;
  font-size: 0.9rem;
  text-align: center;
}

.setting-row.checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calculate-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.calculate-route-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.calculate-route-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Share Route Section */
.share-route-section {
  margin-top: 12px;
  position: relative;
}

.share-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--info);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.share-route-btn:hover {
  background: rgba(59, 130, 246, 0.3);
}

.share-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--surface-elevated);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 14px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.share-header span {
  color: white;
  font-weight: 500;
}

.share-header button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}

.share-link-box {
  display: flex;
  gap: 8px;
}

.share-link-box input {
  flex: 1 1;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
}

.share-link-box .copy-btn {
  padding: 10px 14px;
  background: var(--success);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.share-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.spin {
  animation: spin 1s linear infinite;
}

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

/* Multi-Stop Route Planning Styles */
.route-point-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

.route-point-marker.origin {
  background: var(--success);
  color: white;
}

.route-point-marker.destination {
  background: var(--danger);
  color: white;
}

.route-point-marker.stop {
  background: var(--warning);
  color: white;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
}

.route-stops-section {
  margin: 8px 0;
  padding: 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.stops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stops-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.stops-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: all 0.2s;
}

.stop-item.dragging {
  opacity: 0.5;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.stop-drag-handle {
  cursor: grab;
  color: rgba(255,255,255,0.3);
  padding: 4px;
  display: flex;
  align-items: center;
}

.stop-drag-handle:active {
  cursor: grabbing;
}

.stop-drag-handle:hover {
  color: rgba(255,255,255,0.6);
}

.stop-input-wrapper {
  flex: 1 1;
  min-width: 0;
}

.stop-input-wrapper input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: white;
  font-size: 0.85rem;
}

.stop-input-wrapper input::placeholder {
  color: rgba(255,255,255,0.4);
}

.stop-input-wrapper input:focus {
  outline: none;
  border-color: var(--success);
}

.stop-farm-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  color: var(--success);
}

.stop-farm-badge svg {
  flex-shrink: 0;
}

.stop-farm-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-stop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(239, 68, 68, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.remove-stop-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.add-stop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.add-stop-btn:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.add-stop-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stop-count-badge {
  padding: 2px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

/* Route Legs Display */
.route-legs-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.route-legs-title {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-legs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-leg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border-left: 3px solid var(--success);
}

.leg-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  min-width: 50px;
}

.leg-details {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leg-endpoints {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
}

.leg-endpoints span {
  color: rgba(255,255,255,0.5);
}

.leg-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

/* Add to Farm as Stop Button */
.add-to-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.add-to-route-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}

.quick-search {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-input-wrapper {
  flex: 1 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}

.search-input-wrapper svg {
  color: rgba(255,255,255,0.4);
}

.search-input-wrapper input {
  flex: 1 1;
  background: none;
  border: none;
  color: white;
  font-size: 0.9rem;
}

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

.search-input-wrapper input:focus {
  outline: none;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-count {
  background: var(--success);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.near-me-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 20px;
  padding: 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--info);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.near-me-btn:hover {
  background: rgba(59, 130, 246, 0.3);
}

.route-summary {
  margin: 16px 20px;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
}

.route-summary h4 {
  font-size: 0.85rem;
  color: var(--success);
  margin-bottom: 6px;
}

.route-summary p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.route-warning {
  font-size: 0.8rem;
  color: var(--warning);
  margin-top: 8px !important;
}

.view-toggle {
  display: none;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 4px;
}

.view-toggle button {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle button.active {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.listings-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

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

.favorites-toggle, .notifications-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.favorites-toggle:hover, .notifications-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.favorites-toggle.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.notifications-btn {
  padding: 6px 10px;
}

.notifications-btn:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.filter-tag.product {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.filter-tag.access {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.filter-tag.service {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.clear-filters {
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 12px;
  color: var(--danger);
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
}

.clear-filters:hover {
  background: rgba(239, 68, 68, 0.2);
}

.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.favorite-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.favorite-btn.active {
  background: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.listing-card {
  position: relative;
}

.listings-list {
  flex: 0 0 auto;
  padding: 16px;
}

.listing-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.listing-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}

.listing-card.selected {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.listing-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.listing-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.listing-logo-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.listing-info {
  flex: 1 1;
  padding-right: 40px; /* Make room for favorite button */
}

.listing-name {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 4px;
}

.listing-location {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.featured-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning) 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.listing-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.access-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.parking-badge {
  padding: 4px 8px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(22, 163, 74, 0.18);
  color: var(--success);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.listing-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.product-tag {
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-radius: 20px;
  font-size: 0.75rem;
}

.product-tag.soy {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.product-tag.custom {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.product-more {
  padding: 4px 10px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 20px;
  font-size: 0.75rem;
}

/* Soy Notice Card */
.soy-notice-card {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.soy-notice-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.soy-notice-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin: 0;
}

.listing-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.service-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  border-radius: 4px;
  font-size: 0.7rem;
}

.listing-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.action-btn.phone {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.action-btn.phone:hover {
  background: rgba(59, 130, 246, 0.3);
}

.action-btn.details {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.action-btn.details:hover {
  background: rgba(34, 197, 94, 0.3);
}

.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

.empty-state h3 {
  color: rgba(255,255,255,0.7);
  margin: 16px 0 8px;
}

.ftf-map-container {
  flex: 1 1;
  background: var(--background);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ftf-map-container.list {
  display: none;
}

.mapbox-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

/* Map Markers */
.farm-marker {
  cursor: pointer;
  transition: transform 0.2s;
}

.farm-marker:hover {
  transform: scale(1.2);
  z-index: 10;
}

.marker-pin {
  width: 36px;
  height: 36px;
  color: var(--warning);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.marker-pin.truck-friendly {
  color: var(--success);
}

.marker-pin.no-truck {
  color: var(--danger);
}

/* Map Popup Styles */
.mapboxgl-popup-content {
  background: var(--surface-elevated) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

.mapboxgl-popup-close-button {
  color: rgba(255,255,255,0.6) !important;
  font-size: 20px !important;
  padding: 8px 12px !important;
}

.mapboxgl-popup-close-button:hover {
  color: white !important;
  background: transparent !important;
}

.mapboxgl-popup-tip {
  border-top-color: var(--surface-elevated) !important;
}

.map-popup {
  padding: 16px;
  min-width: 200px;
  max-width: 280px;
}

.map-popup .map-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.map-popup .map-popup-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1F5F3F 0%, #184A31 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-family: var(--hhc-font-display, 'Playfair Display', serif);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.map-popup .map-popup-heading {
  min-width: 0;
  flex: 1 1;
}

.map-popup h3 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-popup .popup-location {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0;
}

.map-popup .popup-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.map-popup .badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.map-popup .badge.green {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.map-popup .badge.blue {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

.map-popup .popup-products {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.map-popup .product {
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-radius: 12px;
  font-size: 0.7rem;
}

.map-popup .popup-actions {
  display: flex;
  gap: 8px;
}

.map-popup .popup-link {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.map-popup .popup-link:hover {
  opacity: 0.9;
}

/* Map Legend — collapsible button + popover in the top-right of the map */
.map-legend-wrapper {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
}

.map-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(17, 24, 39, 0.92);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: background 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}

.map-legend-toggle:hover,
.map-legend-toggle:focus-visible {
  background: rgba(34, 197, 94, 0.92);
  border-color: rgba(34, 197, 94, 0.9);
  outline: none;
}

.map-legend-toggle:active {
  transform: scale(0.97);
}

.map-legend-toggle-label {
  font-size: 0.78rem;
  line-height: 1;
}

.map-legend-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: mapLegendFadeIn 0.18s ease-out;
}

@keyframes mapLegendFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.map-legend-popover h4 {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warning);
}

.legend-marker.truck-friendly {
  background: var(--success);
}

.legend-marker.no-truck {
  background: var(--danger);
}

.legend-marker.unknown {
  background: var(--warning);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

.map-setup-notice {
  text-align: center;
  padding: 40px;
  max-width: 500px;
}

.map-setup-notice svg {
  color: rgba(255,255,255,0.2);
  margin-bottom: 20px;
}

.map-setup-notice h3 {
  color: white;
  margin-bottom: 12px;
}

.map-setup-notice p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.map-setup-notice code {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 4px;
}

.map-setup-notice ul {
  text-align: left;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-top: 16px;
}

.map-setup-notice li {
  margin-bottom: 8px;
}

/* Filter Panel Styles */
.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.filter-panel {
  width: 400px;
  max-width: 100%;
  background: #0f172a;
  height: 100%;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-header h3 {
  color: white;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.filter-section {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-section h4 {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.filter-checkbox, .filter-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-checkbox input, .filter-radio input {
  accent-color: var(--success);
}

.radius-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radius-slider input {
  flex: 1 1;
  accent-color: var(--success);
}

.radius-slider span {
  color: var(--success);
  font-weight: 600;
  min-width: 70px;
}

.filter-actions {
  padding: 20px;
  display: flex;
  gap: 12px;
}

.btn-reset {
  flex: 1 1;
  padding: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

.btn-apply {
  flex: 1 1;
  padding: 12px;
  background: var(--success);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .view-toggle {
    display: flex;
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  }

  .ftf-main {
    flex-direction: column;
    min-height: calc(100vh - 120px);
    height: auto;
    overflow: visible;
  }
  
  .ftf-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-width: initial;
    flex-shrink: 0;
  }
  
  /* Split view - show route panel with scrolling */
  .ftf-sidebar.split-view {
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .ftf-sidebar.split-view .listings-list,
  .ftf-sidebar.split-view .quick-search,
  .ftf-sidebar.split-view .listings-header,
  .ftf-sidebar.split-view .active-filters {
    display: none;
  }
  
  /* Map view - hide sidebar completely */
  .ftf-sidebar.map-view {
    display: none;
  }
  
  /* List view - show everything, full screen */
  .ftf-sidebar.list-view {
    flex: 1 1;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  .ftf-sidebar.list-view .route-panel {
    display: none;
  }
  
  .ftf-sidebar.list-view .quick-search {
    display: block;
    padding: 12px 16px;
  }
  
  .ftf-sidebar.list-view .listings-header {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .ftf-sidebar.list-view .listings-list {
    display: block;
    flex: 1 1;
    overflow-y: auto;
    padding: 12px 16px 120px;
  }
  
  /* Bigger cards in list view */
  .ftf-sidebar.list-view .listing-card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
  }
  
  .ftf-sidebar.list-view .listing-card-header {
    gap: 14px;
  }
  
  .ftf-sidebar.list-view .listing-logo-placeholder {
    width: 56px;
    height: 56px;
  }
  
  .ftf-sidebar.list-view .listing-name {
    font-size: 1.1rem;
  }
  
  .ftf-sidebar.list-view .listing-location {
    font-size: 0.9rem;
  }
  
  .ftf-sidebar.list-view .listing-products {
    margin-top: 12px;
  }
  
  .ftf-sidebar.list-view .product-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .ftf-sidebar.list-view .listing-footer {
    margin-top: 14px;
    padding-top: 14px;
  }
  
  .ftf-map-container {
    flex: 1 1;
    min-height: 50vh;
  }
  
  /* List view - hide map */
  .ftf-map-container.list {
    display: none !important;
  }
  
  .ftf-map-container.map,
  .ftf-map-container.split {
    display: flex;
  }
  
  .map-legend-wrapper {
    top: 8px;
    right: 8px;
  }

  .route-panel {
    padding: 16px;
  }
  
  .route-planning-panel {
    max-height: none;
    overflow-y: visible;
  }
}

/* Tablet Landscape specific - ensure scroll works */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .ftf-sidebar.split-view {
    max-height: 45vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  .ftf-sidebar.split-view .route-panel {
    padding-bottom: 20px;
  }
}

@media (max-width: 640px) {
  .farm-to-freight-page {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
  }

  .ftf-main {
    flex-direction: column;
    min-height: auto;
    height: auto !important;
    overflow: visible !important;
  }

  .ftf-header {
    padding: 12px 16px;
  }
  
  .ftf-header-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .ftf-branding h1 {
    font-size: 1.25rem;
  }
  
  .ftf-branding p {
    font-size: 0.8rem;
  }
  
  .header-actions-group {
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }
  
  .producer-login-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .list-farm-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .route-panel {
    padding: 14px;
  }
  
  .route-panel h3 {
    font-size: 0.95rem;
  }
  
  .route-input {
    padding: 10px 12px 10px 36px;
    font-size: 0.9rem;
  }
  
  .route-input-group svg {
    left: 10px;
  }
  
  .calculate-route-btn {
    padding: 12px;
    font-size: 0.9rem;
  }
  
  .filter-panel {
    width: 100%;
  }
  
  .ftf-map-container {
    min-height: 60vh;
  }
  
  .listings-header {
    padding: 8px 12px;
  }
  
  .header-buttons {
    gap: 4px;
  }
  
  .favorites-toggle, .notifications-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
}


/* Donation Section Styles */
.donation-section {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.donation-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: var(--warning);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.donation-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.3);
}

.donation-section.expanded .donation-toggle {
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
}

.donation-content {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 320px;
  padding: 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px 12px 0 12px;
  margin-bottom: -1px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.donation-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.donation-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.donation-message {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.donation-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.donation-btn {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.donation-btn.paypal {
  /* PayPal brand palette — dark navy → PayPal blue gradient. */
  background: linear-gradient(135deg, #003087 0%, #0070BA 100%);
  color: white;
}

.donation-btn.paypal:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 112, 186, 0.35);
}

.donation-btn.venmo {
  background: linear-gradient(135deg, #3D95CE 0%, #008CFF 100%);
  color: white;
}

.donation-btn.venmo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 140, 255, 0.3);
}

.donation-handles {
  display: flex;
  justify-content: space-around;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-family: monospace;
}

.donation-handles span {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .donation-section {
    bottom: 150px;
    right: 10px;
    left: 10px;
  }

  .donation-toggle {
    width: 100%;
    justify-content: center;
  }

  .donation-content {
    width: auto;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
  }

  .donation-buttons {
    flex-direction: column;
  }
}


/* ============ Truck Route Styles ============ */

/* Route line markers on map */
.route-marker {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.route-marker:hover {
  transform: scale(1.1);
}

.route-marker .marker-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
}

.origin-marker .marker-icon {
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
  color: white;
}

.destination-marker .marker-icon {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger) 100%);
  color: white;
}

.waypoint-marker .marker-icon {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning) 100%);
  color: white;
  font-size: 12px;
}

.route-popup {
  padding: 8px;
  font-size: 0.85rem;
}

.route-popup strong {
  color: var(--hhc-blue);
}

/* Route Summary Panel */
.route-summary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.route-summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.route-summary-header .truck-icon {
  color: var(--info);
}

.route-summary-header h4 {
  flex: 1 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.clear-route-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 6px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-route-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.route-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.route-stat {
  flex: 1 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 8px;
}

.route-stat svg {
  color: var(--info);
  flex-shrink: 0;
}

.route-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.route-stat .stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.route-endpoints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
}

.endpoint-marker {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.endpoint-marker.origin {
  background: linear-gradient(135deg, var(--success) 0%, var(--success) 100%);
}

.endpoint-marker.destination {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger) 100%);
}

.endpoint-marker.stop {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning) 100%);
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
}

.endpoint.waypoint {
  padding-left: 8px;
  border-left: 2px solid rgba(245, 158, 11, 0.3);
}

.endpoint-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-warnings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.route-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--warning);
  line-height: 1.4;
}

.route-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .route-stats {
    flex-direction: column;
    gap: 8px;
  }
  
  .route-stat {
    justify-content: center;
  }
}

/* ============ Haul & Heal - Farms Along Route ============ */

.farms-along-route-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.farms-along-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.farms-along-header .farms-icon {
  color: var(--success);
}

.farms-along-header .farms-count {
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 600;
}

.route-filter-toggle {
  width: 100%;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.route-filter-toggle:hover {
  background: rgba(34, 197, 94, 0.25);
}

.route-filter-toggle.active {
  background: var(--success);
  color: white;
}

.buffer-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.buffer-selector select {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.8rem;
  cursor: pointer;
}

.buffer-selector select:focus {
  outline: none;
  border-color: var(--info);
}

/* Route distance badge on listing cards */
.route-distance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.1) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

.route-distance-badge svg {
  color: var(--success);
}

/* Highlight cards that are on the route */
.listing-card.on-route {
  border-left: 3px solid var(--success);
}

/* Show all farms button */
.show-all-btn {
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  color: var(--info);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-all-btn:hover {
  background: rgba(59, 130, 246, 0.3);
}

/* Active route filter indicator */
.listings-count {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============ User Dropdown Menu ============ */

.ftf-user-menu {
  position: relative;
}

.ftf-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: var(--hhc-forest);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ftf-user-btn:hover {
  background: rgba(34, 197, 94, 0.15);
}

.ftf-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1001;
  overflow: hidden;
}

.ftf-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ftf-dropdown-item:hover {
  background: var(--surface-elevated);
  color: var(--hhc-blue);
}

.ftf-dropdown-item.logout {
  border-top: 1px solid var(--border);
  color: var(--danger);
}

.ftf-dropdown-item.logout:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.ftf-dropdown-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ftf-dropdown-item.delete-account {
  color: var(--danger);
  font-size: 12px;
}

.ftf-dropdown-item.delete-account:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.ftf-spin {
  animation: ftf-spin 1s linear infinite;
}

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

/* Mobile menu settings link */
.ftf-mobile-link.settings {
  color: var(--hhc-forest);
  background: rgba(34, 197, 94, 0.1);
}

.ftf-mobile-link.settings:hover {
  background: rgba(34, 197, 94, 0.15);
}

/* ============ Route Actions & Saved Routes ============ */

.route-actions-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  color: var(--info);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-route-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.25) 100%);
  transform: translateY(-1px);
}

.save-route-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.my-routes-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.my-routes-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.spin {
  animation: spin 1s linear infinite;
}


/*# sourceMappingURL=646.f2e13df4.chunk.css.map*/