/* walks.css — styles for walks.html only */

/* ---- WALKS LISTING ---- */
#walks-section { background: var(--off-white); padding: 60px 40px 100px; }
.walks-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 40px; flex-wrap: wrap; gap: 24px; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
  padding: 8px 18px; border-radius: 100px; border: 1.5px solid var(--gray-200);
  background: var(--white); color: var(--gray-700); font-family: var(--font-body);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.walks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 20px; }

/* ---- WALK CARDS ---- */
.walk-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--gray-200);
  transition: transform 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.5s ease both;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1e40af; /* pick any color */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.walk-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.walk-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.walk-user { display: flex; align-items: center; gap: 12px; }
.walk-user-name  { font-weight: 700; font-size: 15px; color: var(--gray-900); line-height: 1.2; }
.walk-user-year  { font-size: 12px; color: var(--gray-400); font-weight: 500; margin-top: 2px; }
.walk-type-badge { padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-night    { background: #1e1b4b; color: #a5b4fc; }
.badge-morning  { background: #fef3c7; color: #92400e; }
.badge-study    { background: #d1fae5; color: #065f46; }
.badge-exercise { background: #fce7f3; color: #9d174d; }
.badge-casual   { background: #e0f2fe; color: #075985; }
.walk-route {
  background: var(--off-white); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.walk-route-from, .walk-route-to { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.walk-route-arrow { color: var(--blue); font-size: 16px; flex-shrink: 0; }
.walk-meta { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.walk-meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-400); font-weight: 500; }
.walk-meta-icon { font-size: 14px; }
.walk-spots { margin-bottom: 16px; }
.walk-spots-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-400); margin-bottom: 6px; font-weight: 500; }
.walk-spots-text strong { color: var(--gray-700); }
.spots-bar { height: 4px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.spots-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #1a6abf); border-radius: 4px; transition: width 0.5s ease; }
.walk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag { padding: 4px 10px; background: var(--gray-100); color: var(--gray-700); border-radius: 100px; font-size: 11px; font-weight: 600; }
.walk-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
.walk-card-time { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.walk-card-time { font-size: 13px; color: var(--gray-400); font-weight: 500; }
.walk-notes { font-size: 13px; color: var(--gray-400); margin-bottom: 16px; font-style: italic; }
.btn-join {
  background: var(--blue); color: var(--white); border: none;
  padding: 10px 20px; border-radius: 100px; font-family: var(--font-body);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-join:hover:not(:disabled) { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,83,159,0.25); }
.btn-join.joined  { background: #16a34a; cursor: default; }
.btn-join.full    { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }

/* ---- MAP MODAL ---- */
.map-modal {
  width: 90%;
  max-width: 820px;
  padding: 28px 32px 32px;
}
#walk-map-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: filter 0.3s ease;
}
#walk-map-container.map-sat-enhance {
  filter: saturate(1.5) brightness(1.08);
}
#walk-map-container:fullscreen,
#walk-map-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/* ---- MAP THEME SELECT ---- */
.map-theme-select {
  padding: 7px 28px 7px 12px;
  border-radius: 100px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239896a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  outline: none;
  transition: border-color 0.2s;
}
.map-theme-select:focus { border-color: var(--blue); }

/* ---- MAP FULLSCREEN BUTTON ---- */
.map-fullscreen-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--gray-400);
  transition: all 0.2s;
}
.map-fullscreen-btn:hover { background: var(--gray-100); color: var(--gray-900); }
.map-fullscreen-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- CSS FULLSCREEN FALLBACK (iOS / no Fullscreen API) ---- */
.map-modal.map-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  padding: 16px 20px !important;
  display: flex;
  flex-direction: column;
  z-index: 9999;
}
.map-modal.map-fullscreen #walk-map-container {
  flex: 1;
  height: 0 !important;
  min-height: 0;
  border-radius: 0;
}

/* ---- PARTICIPANT LOCATION MARKERS ---- */
.participant-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFD200;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #00539F;
  cursor: pointer;
  transition: transform 0.2s;
}
.participant-marker:hover { transform: scale(1.15); }

/* ---- LOCATION AUTOCOMPLETE ---- */
.form-group { position: relative; }

.location-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  z-index: 600;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
}

.location-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s;
}
.location-suggestion-item:hover { background: #f5f7fa; }

.sugg-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}
.sugg-sub {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- POST WALK MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,20,40,0.7);
  backdrop-filter: blur(8px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.96); transition: transform 0.3s ease; position: relative;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.modal-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--gray-900); }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--gray-200);
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gray-400); transition: all 0.2s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-900); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; letter-spacing: 0.02em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px;
  color: var(--gray-900); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,83,159,0.08);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239896a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-100);
}
.btn-cancel {
  padding: 12px 24px; border-radius: 100px; border: 1.5px solid var(--gray-200);
  background: none; color: var(--gray-700); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-cancel:hover { background: var(--gray-100); }
.btn-submit {
  padding: 12px 28px; border-radius: 100px; border: none;
  background: var(--blue); color: var(--white); font-family: var(--font-body);
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-submit:hover:not(:disabled) { background: var(--blue-light); box-shadow: 0 4px 16px rgba(0,83,159,0.3); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  #walks-section { padding: 40px 20px 80px; }
  .walks-header { flex-direction: column; }
  .modal { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
}
/* ---- MAP BUTTON ---- */
.btn-view-map {
  background: var(--white); 
  color: var(--blue); 
  border: 1.5px solid var(--blue);
  padding: 8.5px 16px; /* 8.5px instead of 10px accounts for the 1.5px border height */
  border-radius: 100px; 
  font-family: var(--font-body);
  font-size: 13px; 
  font-weight: 700; 
  cursor: pointer; 
  transition: all 0.2s;
  margin-left: 8px; /* Adds space between this and the joined button */
}

.btn-view-map:hover {
  background: var(--off-white, #f8fafc);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 83, 159, 0.1);
}

/* ---- END WALK BUTTON (creator only) ---- */
.btn-end-walk {
  background: var(--white);
  color: #dc2626;
  border: 1.5px solid #dc2626;
  padding: 8.5px 16px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-end-walk:hover {
  background: #fef2f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}
/* ---- MAGIC AI BUTTON & INPUT ---- */
.btn-ai-magic {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ai-magic:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
  filter: brightness(1.1);
}

.ai-hidden-container {
  display: none; /* Toggled via JS */
  width: 100%;
  max-width: 350px;
  gap: 8px;
  animation: slideDown 0.3s ease out;
}

/* Custom Properties for Branding */
:root {
  --gemini-gradient: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-luxe: 0 20px 40px rgba(0, 0, 0, 0.1);
  --text-main: #1f1f1f;
  --text-muted: #5f6368;
}

/* Modal Overlay - Full Screen Blur */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

/* Modal Container */
.modal.ai-modal {
  background: var(--glass-bg);
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-luxe);
  overflow: hidden;
  font-family: 'Segoe UI', Roboto, sans-serif;
  animation: modalScale 0.3s ease-out;
}

/* Header & Branding */
.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

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

.ai-badge-icon {
  font-size: 1.2rem;
  background: var(--gemini-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.gemini-text-pretty {
  background: var(--gemini-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  transition: transform 0.2s;
}

.modal-close:hover { transform: rotate(90deg); }

/* Body & Content */
.ai-modal-body {
  padding: 24px;
}

.gemini-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f0f4f9;
  border-radius: 100px;
  margin-bottom: 16px;
}

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

.ai-description {
  margin-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Input Area */
.ai-textarea-modern {
  width: 100%;
  height: 120px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: white;
  resize: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ai-textarea-modern:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

/* Footer & Status */
.ai-modal-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.ai-status-dot-group {
  position: relative;
  width: 10px;
  height: 10px;
}

.ai-status-dot {
  display: block;
  width: 10px;
  height: 10px;
  background: #34a853;
  border-radius: 50%;
}

.ai-status-pulse {
  position: absolute;
  inset: 0;
  background: #34a853;
  border-radius: 50%;
  opacity: 0.4;
  animation: pulse 2s infinite;
}

.ai-assistant-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Submit Button */
.btn-gemini-submit-modern {
  background: #1f1f1f;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-gemini-submit-modern:hover {
  background: #000;
  transform: translateY(-2px);
}

/* Animations */
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  70% { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}/* Updated Magic Button with Gemini Colors */
.btn-gemini-submit-modern {
  background: var(--gemini-gradient); /* Uses the blue-purple-red gradient defined in :root */
  background-size: 200% auto; /* Allows for a shimmer animation effect */
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(155, 114, 203, 0.3); /* Subtle purple glow */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gemini-submit-modern:hover {
  background-position: right center; /* Moves the gradient on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 114, 203, 0.5);
}

.btn-gemini-submit-modern:active {
  transform: translateY(0);
}

/* Optional: Subtle "shimmer" animation for the button icon */
.btn-icon {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-gemini-submit-modern:hover .btn-icon {
  transform: translateX(3px) translateY(-2px);
}

/* Specific text styling inside the button to ensure it pops */
.btn-gemini-submit-modern span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Status Dot & Pulse - Reimagined in Gemini Blue/Violet */
.ai-status-dot {
  display: block;
  width: 10px;
  height: 10px;
  /* Using the signature Blue from the Gemini palette */
  background: #4285f4; 
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.4);
}

.ai-status-pulse {
  position: absolute;
  inset: -2px; /* Slightly larger than the dot for a better halo */
  background: #9b72cb; /* Soft purple for the outer ring */
  border-radius: 50%;
  opacity: 0;
  animation: geminiPulse 2.5s infinite;
}

/* A smoother, more "breathing" animation */
@keyframes geminiPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(2.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Subtle text glow for the status label */
.ai-assistant-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #5f6368;
  letter-spacing: 0.2px;
}