/* ============================================================
   TIER 7A FEATURES CSS — First Out App
   Features: Weather Journey Planning, Women's Safety Mode,
             Multi-Stop Optimizer, Exit-to-Destination Nav

   Integration: Add <link rel="stylesheet" href="/tier7a-features.css">
   to the <head> of index.html.
   ============================================================ */


/* ============================================================
   SHARED: Card patterns
   ============================================================ */

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

.t7a-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #F0F2F8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.t7a-card-icon {
  font-size: 15px;
  flex-shrink: 0;
}


/* ============================================================
   SHARED: Toast notification
   ============================================================ */

.t7a-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated, #1E2340);
  color: var(--text, #F0F2F8);
  padding: 12px 20px;
  border-radius: var(--radius-sm, 10px);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.t7a-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ============================================================
   9. WEATHER CARD — Home Screen
   ============================================================ */

.t7a-weather-card {
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 14px);
  padding: 14px 16px;
  margin-bottom: 12px;
}

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

.t7a-weather-icon {
  font-size: 28px;
  line-height: 1;
}

.t7a-weather-temp {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #F0F2F8);
  font-family: 'Inter', sans-serif;
}

.t7a-weather-desc {
  font-size: 13px;
  color: var(--text-secondary, #8B92A8);
  margin-left: auto;
}

.t7a-weather-alert {
  background: rgba(255, 86, 48, 0.12);
  border: 1px solid rgba(255, 86, 48, 0.25);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--red, #FF5630);
  line-height: 1.4;
}

.t7a-weather-walk {
  background: rgba(54, 179, 126, 0.12);
  border: 1px solid rgba(54, 179, 126, 0.25);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--green, #36B37E);
  line-height: 1.4;
}

.t7a-weather-rain {
  border-color: rgba(255, 86, 48, 0.2);
}

.t7a-weather-nice {
  border-color: rgba(54, 179, 126, 0.2);
}


/* ============================================================
   9. WEATHER — Result Screen (Rain / Covered Exits)
   ============================================================ */

.t7a-weather-exit-card {
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 14px);
  padding: 14px 16px;
  margin-top: 12px;
}

.t7a-weather-exits-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t7a-weather-exit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.t7a-weather-exit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.t7a-weather-exit-dot.t7a-covered {
  background: var(--green, #36B37E);
  box-shadow: 0 0 6px rgba(54, 179, 126, 0.4);
}

.t7a-weather-exit-dot.t7a-uncovered {
  background: var(--red, #FF5630);
  box-shadow: 0 0 6px rgba(255, 86, 48, 0.4);
}

.t7a-weather-exit-name {
  font-size: 13px;
  color: var(--text, #F0F2F8);
  font-weight: 500;
}

.t7a-weather-exit-label {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
  margin-left: auto;
}

.t7a-weather-no-cover {
  font-size: 12px;
  color: var(--amber, #FFAB00);
  padding: 8px 0;
}

.t7a-weather-crowding {
  font-size: 12px;
  color: var(--amber, #FFAB00);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}


/* ============================================================
   10. WOMEN'S SAFETY MODE — Toggle
   ============================================================ */

.t7a-safety-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border, rgba(255,255,255,0.08));
  background: var(--bg-card, #141829);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  line-height: 1;
}

.t7a-safety-toggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-card-hover, #1C2137);
}

.t7a-safety-toggle.t7a-safety-active {
  background: rgba(76, 154, 255, 0.15);
  border-color: var(--accent, #4C9AFF);
  box-shadow: 0 0 12px rgba(76, 154, 255, 0.25);
}


/* ============================================================
   10. WOMEN'S SAFETY — Result Card
   ============================================================ */

.t7a-safety-card {
  background: var(--bg-card, #141829);
  border: 1px solid rgba(76, 154, 255, 0.2);
  border-radius: var(--radius, 14px);
  padding: 14px 16px;
  margin-top: 12px;
}

.t7a-safety-on .t7a-safety-card {
  border-color: rgba(76, 154, 255, 0.35);
}

.t7a-safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.t7a-safety-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t7a-safety-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #8B92A8);
}

.t7a-safety-value {
  font-size: 13px;
  color: var(--text, #F0F2F8);
}

.t7a-safety-value.t7a-safe {
  color: var(--green, #36B37E);
}

.t7a-safety-value.t7a-warn {
  color: var(--amber, #FFAB00);
}

.t7a-safety-detail {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
}

.t7a-safety-exits {
  font-size: 12px;
  color: var(--text, #F0F2F8);
  margin-bottom: 10px;
  line-height: 1.5;
}

.t7a-safety-warning {
  background: rgba(255, 171, 0, 0.1);
  border: 1px solid rgba(255, 171, 0, 0.2);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--amber, #FFAB00);
  margin-bottom: 10px;
  line-height: 1.4;
}

.t7a-safety-generic {
  font-size: 12px;
  color: var(--text-secondary, #8B92A8);
  margin-bottom: 10px;
}

.t7a-safety-btp {
  background: rgba(76, 154, 255, 0.08);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text, #F0F2F8);
  margin-bottom: 12px;
  line-height: 1.5;
}

.t7a-safety-btp strong {
  color: var(--accent, #4C9AFF);
}

.t7a-safety-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.t7a-safety-share-btn,
.t7a-safety-checkin-btn {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-elevated, #1E2340);
  color: var(--text, #F0F2F8);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.t7a-safety-share-btn:hover,
.t7a-safety-checkin-btn:hover {
  background: var(--bg-card-hover, #1C2137);
}

.t7a-safety-tip {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Plan a Day Button
   ============================================================ */

.t7a-plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 14px);
  color: var(--text, #F0F2F8);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}

.t7a-plan-btn:hover {
  background: var(--bg-card-hover, #1C2137);
  border-color: var(--accent, #4C9AFF);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Modal Overlay
   ============================================================ */

.t7a-journey-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.92);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: t7a-fadeIn 0.3s ease;
}

.t7a-journey-overlay.t7a-closing {
  animation: t7a-fadeOut 0.3s ease forwards;
}

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

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

.t7a-journey-modal {
  background: var(--bg, #0A0E1A);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 14px) var(--radius, 14px) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  animation: t7a-slideUp 0.3s ease;
}

@keyframes t7a-slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.t7a-journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.t7a-journey-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #F0F2F8);
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.t7a-journey-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: var(--bg-card, #141829);
  color: var(--text-secondary, #8B92A8);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t7a-journey-close:hover {
  background: var(--bg-card-hover, #1C2137);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Stops List
   ============================================================ */

.t7a-journey-stops {
  margin-bottom: 12px;
}

.t7a-stop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  margin-bottom: 6px;
}

.t7a-stop-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #4C9AFF);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.t7a-stop-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #F0F2F8);
  flex: 1;
}

.t7a-stop-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 86, 48, 0.12);
  color: var(--red, #FF5630);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.t7a-stop-remove:hover {
  background: rgba(255, 86, 48, 0.25);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Input & Autocomplete
   ============================================================ */

.t7a-journey-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.t7a-journey-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  color: var(--text, #F0F2F8);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.t7a-journey-input:focus {
  border-color: var(--accent, #4C9AFF);
}

.t7a-journey-input::placeholder {
  color: var(--text-secondary, #8B92A8);
}

.t7a-journey-add-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--accent, #4C9AFF);
  background: rgba(76, 154, 255, 0.12);
  color: var(--accent, #4C9AFF);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t7a-journey-add-btn:hover {
  background: rgba(76, 154, 255, 0.2);
}

.t7a-journey-autocomplete {
  margin-bottom: 12px;
}

.t7a-ac-option {
  padding: 10px 14px;
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-top: none;
  color: var(--text, #F0F2F8);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.t7a-ac-option:first-child {
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px) var(--radius-sm, 10px) 0 0;
}

.t7a-ac-option:last-child {
  border-radius: 0 0 var(--radius-sm, 10px) var(--radius-sm, 10px);
}

.t7a-ac-option:hover {
  background: var(--bg-card-hover, #1C2137);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Optimize Button
   ============================================================ */

.t7a-journey-optimize-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent, #4C9AFF);
  border: none;
  border-radius: var(--radius-sm, 10px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-bottom: 16px;
  transition: opacity 0.2s;
}

.t7a-journey-optimize-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.t7a-journey-optimize-btn:not(:disabled):hover {
  opacity: 0.9;
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Timeline Result
   ============================================================ */

.t7a-journey-result {
  margin-bottom: 16px;
}

.t7a-journey-timeline {
  padding: 12px 0;
}

.t7a-timeline-total {
  font-size: 14px;
  color: var(--text, #F0F2F8);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(76, 154, 255, 0.08);
  border-radius: var(--radius-sm, 10px);
}

.t7a-timeline-total strong {
  color: var(--accent, #4C9AFF);
}

.t7a-timeline-stop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.t7a-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #4C9AFF);
  flex-shrink: 0;
  margin-left: 5px;
}

.t7a-timeline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #F0F2F8);
}

.t7a-timeline-segment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 2px 10px;
}

.t7a-timeline-line {
  width: 2px;
  height: 20px;
  background: var(--border, rgba(255,255,255,0.08));
}

.t7a-timeline-time {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
}

.t7a-journey-error {
  font-size: 12px;
  color: var(--red, #FF5630);
  padding: 10px;
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Actions (Save / Share)
   ============================================================ */

.t7a-journey-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.t7a-journey-save-btn,
.t7a-journey-share-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-card, #141829);
  color: var(--text, #F0F2F8);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.t7a-journey-save-btn:hover,
.t7a-journey-share-btn:hover {
  background: var(--bg-card-hover, #1C2137);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Presets
   ============================================================ */

.t7a-journey-presets h3,
.t7a-journey-saved h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #F0F2F8);
  margin: 0 0 10px 0;
  font-family: 'Inter', sans-serif;
}

.t7a-preset-card {
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.t7a-preset-card:hover {
  background: var(--bg-card-hover, #1C2137);
  border-color: var(--accent, #4C9AFF);
}

.t7a-preset-header {
  font-size: 13px;
  color: var(--text, #F0F2F8);
  margin-bottom: 4px;
}

.t7a-preset-desc {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
  margin-bottom: 4px;
  line-height: 1.4;
}

.t7a-preset-stops {
  font-size: 11px;
  color: var(--accent, #4C9AFF);
}


/* ============================================================
   11. JOURNEY OPTIMIZER — Saved Itineraries
   ============================================================ */

.t7a-saved-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.t7a-saved-row:hover {
  background: var(--bg-card-hover, #1C2137);
}

.t7a-saved-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #F0F2F8);
  flex: 1;
}

.t7a-saved-time {
  font-weight: 400;
  color: var(--text-secondary, #8B92A8);
  font-size: 11px;
}

.t7a-saved-stops {
  font-size: 11px;
  color: var(--accent, #4C9AFF);
  width: 100%;
}

.t7a-saved-delete {
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.t7a-no-saved {
  font-size: 12px;
  color: var(--text-secondary, #8B92A8);
  padding: 8px 0;
}


/* ============================================================
   12. EXIT-TO-DESTINATION NAVIGATION — Card
   ============================================================ */

.t7a-nav-card {
  background: var(--bg-card, #141829);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius, 14px);
  padding: 14px 16px;
  margin-top: 12px;
}

.t7a-nav-toggle-header {
  cursor: pointer;
  user-select: none;
}

.t7a-nav-chevron {
  font-size: 12px;
  color: var(--text-secondary, #8B92A8);
  transition: transform 0.2s;
}

.t7a-nav-exit {
  padding: 12px;
  background: var(--bg-elevated, #1E2340);
  border-radius: var(--radius-sm, 10px);
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.t7a-nav-exit-active {
  border-color: var(--accent, #4C9AFF);
}

.t7a-nav-exit-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.t7a-nav-exit-header strong {
  font-size: 13px;
  color: var(--text, #F0F2F8);
}

.t7a-nav-street {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
}

.t7a-nav-compass {
  font-size: 11px;
  color: var(--accent, #4C9AFF);
  margin-left: auto;
}

.t7a-nav-landmark {
  font-size: 12px;
  color: var(--text-secondary, #8B92A8);
  margin-bottom: 8px;
}

.t7a-nav-destinations {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t7a-nav-dest {
  padding: 8px 10px;
  background: rgba(76, 154, 255, 0.06);
  border-radius: 8px;
}

.t7a-nav-dest-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #F0F2F8);
  margin-bottom: 2px;
}

.t7a-nav-dest-dir {
  font-size: 11px;
  color: var(--text-secondary, #8B92A8);
  line-height: 1.5;
}


/* ============================================================
   12. EXIT NAV — Compass & Lost
   ============================================================ */

.t7a-nav-compass-btn,
.t7a-nav-lost-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-elevated, #1E2340);
  color: var(--text, #F0F2F8);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.t7a-nav-compass-btn:hover,
.t7a-nav-lost-btn:hover {
  background: var(--bg-card-hover, #1C2137);
}

.t7a-compass-display {
  text-align: center;
  padding: 16px;
  margin-top: 10px;
  background: rgba(76, 154, 255, 0.06);
  border-radius: var(--radius-sm, 10px);
}

.t7a-compass-arrow {
  font-size: 48px;
  color: var(--accent, #4C9AFF);
  transition: transform 0.3s ease;
  line-height: 1;
}

.t7a-compass-heading {
  font-size: 13px;
  color: var(--text-secondary, #8B92A8);
  margin-top: 8px;
}

.t7a-nav-lost {
  margin-top: 4px;
}
