/* Trip Planner Master Stylesheet - Bright Pastel Theme (maplay.net/map/tripplanner) */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --bg-light: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f0f6ff 0%, #f0fdf4 40%, #fff1f2 100%);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(241, 245, 249, 0.98);
  --bg-card-active: #eef2ff;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --secondary: #0284c7;
  --secondary-glow: rgba(2, 132, 199, 0.25);
  
  --accent: #f43f5e;
  --accent-gold: #d97706;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --border-light: #e2e8f0;
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

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

body, html {
  font-family: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f0f4fc !important;
  background-image: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 35%, #f0fdf4 70%, #fef2f2 100%) !important;
  background-attachment: fixed !important;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Custom Header Actions inside navi */
.planner-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: var(--border-light);
}

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

.btn-outline-cyan {
  background: #f0f9ff;
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.btn-outline-cyan:hover {
  background: #e0f2fe;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Main Container */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Wizard Section */
.wizard-container {
  max-width: 680px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
  width: 100%;
}

.wizard-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.progress-header {
  margin-bottom: 2rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 33.33%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.4s ease;
  border-radius: var(--radius-full);
}

.step-content {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.step-content.active {
  display: block;
}

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

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Option Grid */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 580px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  background: #fff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.option-card:hover {
  background: var(--bg-card-hover);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.option-card.selected {
  background: var(--bg-card-active);
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.option-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-card.selected .option-icon {
  background: var(--primary);
  color: #fff;
}

.option-info {
  display: flex;
  flex-direction: column;
}

.option-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
}

.option-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Location picker */
.location-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.location-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.input-text {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

.input-text:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.location-status {
  font-size: 0.85rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* Form Nav Footer */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1.25rem;
}

/* Result Page Layout */
.result-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  height: calc(100vh - 120px);
  min-height: 600px;
  width: 100%;
}

@media (max-width: 900px) {
  .result-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 1fr;
    height: auto;
  }
}

.timeline-sidebar {
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.timeline-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(248, 250, 252, 0.8);
}

.trip-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.meta-chip {
  background: #e2e8f0;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--text-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Timeline Cards - Bright Pastel Slots */
.timeline-list {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.timeline-item {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.timeline-item:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
}

.timeline-item.active {
  border-color: var(--secondary);
  background: #f0f9ff;
}

.item-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slot-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.slot-badge.morning { background: #fef3c7; color: #b45309; }
.slot-badge.lunch { background: #dcfce7; color: #15803d; }
.slot-badge.afternoon { background: #e0e7ff; color: #4338ca; }
.slot-badge.cafe { background: #fce7f3; color: #be185d; }
.slot-badge.dinner { background: #f3e8ff; color: #6b21a8; }

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

.place-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.place-address {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
}

/* Travel connector */
.travel-connector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-left: 1rem;
  margin: -0.5rem 0;
  position: relative;
}

.travel-connector::before {
  content: '';
  width: 2px;
  height: 20px;
  background: var(--border-light);
  position: absolute;
  left: 24px;
}

/* Map Canvas Container */
.map-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #e2e8f0;
}

#kakaoMap {
  width: 100%;
  height: 100%;
}

/* Modal UI */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 90%;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

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

.alt-place-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.alt-place-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alt-place-card:hover {
  border-color: var(--secondary);
  background: #f0f9ff;
}

/* Toast Alert */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.3s ease forwards;
}

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