/* Disney Park Plan - Common Styles */
/* This file contains all shared styles for park plan pages */

:root {
  /* Base colors - will be overridden by each park */
  --park-primary: #4a7c3f;
  --park-secondary: #3d6834;
  
  /* Common colors */
  --bg: #f5f3ef;
  --card-bg: #ffffff;
  --text: #2d3a2e;
  --text-muted: #5a6b5c;
  --done-bg: #e8efe8;
  --border: #d4d8d4;
  --shadow: rgba(0,0,0,0.1);
  --current-marker: #ff6b35;
  --ll-gold: #d4a017;
}

[data-theme="dark"] {
  --bg: #1a1f1a;
  --card-bg: #252b25;
  --text: #e8efe8;
  --text-muted: #a0b0a2;
  --done-bg: #1f241f;
  --border: #3a453a;
  --shadow: rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--park-primary) 0%, var(--park-secondary) 100%);
  color: white;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

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

.header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-date {
  font-size: 0.8rem;
  opacity: 0.9;
}

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

.icon-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s;
}

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

/* Progress bar */
.progress-container {
  margin-top: 12px;
}

.progress-text {
  font-size: 0.75rem;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Filter panel */
.filter-panel {
  background: var(--card-bg);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: none;
}

.filter-panel.open {
  display: block;
}

.filter-section {
  margin-bottom: 12px;
}

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

.filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active {
  background: var(--park-primary);
  color: white;
  border-color: var(--park-primary);
}

.chip:hover {
  border-color: var(--park-primary);
}

.time-select {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
}

/* Current time display */
.current-time-bar {
  background: var(--current-marker);
  color: white;
  padding: 8px 16px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jump-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Itinerary list */
.itinerary {
  padding: 8px;
}

.time-marker {
  background: var(--current-marker);
  color: white;
  padding: 6px 16px;
  margin: 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.time-marker::before {
  content: '📍';
}

/* Attraction card */
.attraction-card {
  background: var(--card-bg);
  border-radius: 12px;
  margin: 8px;
  box-shadow: 0 1px 4px var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  touch-action: pan-y;
}

.attraction-card.swiping {
  transition: none;
}

.swipe-indicator {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  background: var(--park-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  padding: 0 20px;
  z-index: 1;
}

.attraction-card.done {
  opacity: 0.5;
  background: var(--done-bg);
}

.attraction-card.hidden {
  display: none;
}

.attraction-card.meal {
  border-left: 4px solid var(--park-primary);
}

.attraction-card.break {
  border-left: 4px solid var(--ll-gold);
}

.card-main {
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  position: relative;
  z-index: 2;
}

.card-time {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--park-primary);
  min-width: 50px;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-title-text {
  word-break: break-word;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-land {
  color: white;
}

.badge-ll {
  background: var(--ll-gold);
  color: white;
}

.badge-type {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-wait {
  background: #ff9500;
  color: white;
  font-weight: 700;
  text-transform: none;
}

.badge-wait-live {
  background: #34c759;
  color: white;
  font-weight: 700;
  text-transform: none;
  animation: pulse 2s ease-in-out infinite;
}

.badge-wait-live-yellow {
  background: #ffcc00;
  color: #000;
  font-weight: 700;
  text-transform: none;
  animation: pulse 2s ease-in-out infinite;
}

.badge-wait-live-red {
  background: #ff3b30;
  color: white;
  font-weight: 700;
  text-transform: none;
  animation: pulse 2s ease-in-out infinite;
}

.ride-closed-emoji {
  font-size: 1rem;
}

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

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

.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover, .action-btn:active {
  background: var(--bg);
  color: var(--park-primary);
}

.action-btn.done-btn.checked {
  color: var(--park-primary);
}

/* Showtimes dropdown */
.showtimes-panel {
  background: var(--bg);
  padding: 8px 16px 12px 78px;
  display: none;
  border-top: 1px solid var(--border);
}

.showtimes-panel.open {
  display: block;
}

.showtimes-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.showtimes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.showtime {
  background: var(--card-bg);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.showtime.passed {
  opacity: 0.4;
  text-decoration: line-through;
}

.showtime.next {
  background: var(--park-primary);
  color: white;
  border-color: var(--park-primary);
}

/* Notes popover */
.notes-popover {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px var(--shadow);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 200;
  max-height: 50vh;
  overflow-y: auto;
}

.notes-popover.open {
  transform: translateY(0);
}

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

.notes-popover h3 {
  font-size: 1rem;
}

.notes-popover p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 150;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Showtimes summary section */
.showtimes-summary {
  background: var(--card-bg);
  margin: 8px;
  border-radius: 12px;
  box-shadow: 0 1px 4px var(--shadow);
  overflow: hidden;
}

.showtimes-summary-header {
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--park-primary);
  color: white;
}

.showtimes-summary-content {
  padding: 12px 16px;
  display: none;
}

.showtimes-summary-content.open {
  display: block;
}

.show-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

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

.show-name {
  font-weight: 500;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.show-times {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

/* Mobile order reminder */
.mobile-order-section {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
  margin: 8px;
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
}

.mobile-order-section h3 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-order-item {
  font-size: 0.8rem;
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
}

/* Footer nav */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  z-index: 100;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 12px;
}

.nav-btn .icon {
  font-size: 1.3rem;
}

.nav-btn.active {
  color: var(--park-primary);
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

