/* 🇦🇺 2026 Australia Trip - Ultra Low Data Design System */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #131b2e;
  --bg-card: #1c273e;
  --bg-card-hover: #24324f;
  
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-amber: #fbbf24;
  --accent-emerald: #34d399;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-glow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

/* Container */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, rgba(19, 27, 46, 0.95), rgba(28, 39, 62, 0.95));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-glow);
}

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

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-badge {
  font-size: 11px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* Geo Status Box */
.geo-status-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: rgba(10, 15, 29, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-size: 13px;
}

.geo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.geo-item strong {
  color: var(--accent-cyan);
}

.city-select {
  background: var(--bg-card);
  color: var(--accent-amber);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

/* Live Focus Card (Time & Geo Aware) */
.focus-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(59, 130, 246, 0.05));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

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

.focus-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 5px;
}

.focus-time {
  font-size: 12px;
  color: var(--text-sub);
}

.focus-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.focus-desc {
  font-size: 13px;
  color: var(--text-sub);
}

.focus-now-line {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-main);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.focus-now-line.next {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--text-sub);
}

.focus-now-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Timeline Selector (Horizontal Scroll) */
.timeline-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.timeline-scroll::-webkit-scrollbar {
  height: 4px;
}
.timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 4px;
}

.date-pill {
  flex: 0 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 68px;
}

.date-pill:hover {
  background: var(--bg-card-hover);
}

.date-pill.active {
  background: var(--accent-blue);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.date-pill.today {
  border-color: var(--accent-amber);
}

.date-pill .pill-date {
  font-size: 13px;
  font-weight: 700;
}

.date-pill .pill-city {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border-bottom: 2px solid var(--accent-cyan);
}

/* Cards & List Layout */
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-active);
}

/* Schedule Card Details */
.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.day-badge {
  background: var(--bg-card);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
}

.hotel-info {
  font-size: 12px;
  color: var(--accent-amber);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Timeline Items */
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.item-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 50px;
}

.item-content {
  flex: 1;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
}

.item-note {
  font-size: 12px;
  color: var(--text-sub);
}

/* 오늘 일정 진행 상황 (호주 현지시간 기준) */
.timeline-item.past {
  opacity: 0.45;
}

.timeline-item.current {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 4px 0;
}

.timeline-item.current .item-time {
  color: var(--accent-amber);
}

.now-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #0a0f1d;
  background: var(--accent-emerald);
  border-radius: 8px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  animation: now-pulse 2s ease-in-out infinite;
}

@keyframes now-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Checkbox Items (Todos & Souvenirs) */
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.todo-text {
  font-size: 14px;
  flex: 1;
  transition: text-decoration 0.2s, color 0.2s;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.tag-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-card-hover);
  color: var(--text-sub);
}

/* Members Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.member-card {
  background: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.member-name {
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 4px;
}

.member-flight {
  font-size: 12px;
  color: var(--text-sub);
}

/* Expenses Summary */
.expense-total {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expense-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-amber);
}

/* Quick Floating Bar / Footer Status */
.quick-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 15, 29, 0.95);
  border-top: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-sub);
  z-index: 100;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  margin-right: 6px;
}

.status-dot.offline {
  background: var(--accent-rose);
}

/* 구글맵 링크 & 검색어 복사 버튼 */
.map-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.map-btn {
  font-size: 11px;
  line-height: 1.4;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-family);
}

.map-btn:hover {
  background: rgba(56, 189, 248, 0.18);
}

/* Low-data Mode Toggle Switch */
.low-data-btn {
  background: var(--bg-card);
  color: var(--accent-cyan);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ============================================================= */
/* 🌤️ Weather Widget & 5-Min Cooldown Refresh Button Styles      */
/* ============================================================= */
.weather-widget {
  margin-top: 12px;
  background: rgba(10, 15, 29, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
}

.weather-widget.loading,
.weather-widget.error {
  font-size: 13px;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

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

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

.weather-temp {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.weather-feels {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  margin-left: 4px;
}

.weather-desc {
  font-size: 12px;
  color: var(--accent-cyan);
}

/* 🔄 5-min Cooldown Refresh Button */
.weather-refresh-btn {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.weather-refresh-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.3);
}

.weather-refresh-btn.cooldown,
.weather-refresh-btn:disabled {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.2);
  cursor: not-allowed;
  opacity: 0.8;
}

.weather-rain-alert {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* Hourly Forecast Horizontal Scroll */
.weather-forecast-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.weather-forecast-scroll::-webkit-scrollbar {
  height: 3px;
}

.forecast-chip {
  flex: 0 0 auto;
  background: rgba(28, 39, 62, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
  min-width: 52px;
}

.forecast-chip.rainy {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.fc-time {
  font-size: 10px;
  color: var(--text-sub);
}

.fc-temp {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin: 1px 0;
}

.fc-pop {
  font-size: 10px;
  color: var(--accent-cyan);
}

/* ============================================================= */
/* 🗺️ Mobile SVG Map View & Interactive Sheet                    */
/* ============================================================= */
.map-view-card {
  position: relative;
  overflow: hidden;
}

.btn-full-route {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  margin-top: 6px;
}

.svg-map-wrapper {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at center, #17243c 0%, #0d1527 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin: 12px 0;
  overflow: hidden;
}

.map-badge-tag {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 11px;
  background: rgba(10, 15, 29, 0.7);
  color: var(--accent-amber);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  z-index: 2;
}

.interactive-svg-map {
  width: 100%;
  height: auto;
  display: block;
}

.map-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-dasharray: 4 4;
}

.route-path-bg {
  fill: none;
  stroke: rgba(56, 189, 248, 0.2);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path-animated {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6 6;
  animation: mapPathDash 30s linear infinite;
}

@keyframes mapPathDash {
  to {
    stroke-dashoffset: -100;
  }
}

/* Map Pin Group */
.map-pin-group {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-pin-group:hover,
.map-pin-group.active {
  transform: scale(1.2);
}

.pin-pulse {
  fill: rgba(56, 189, 248, 0.25);
  animation: pinPulseAnim 2s infinite;
}

@keyframes pinPulseAnim {
  0% { r: 10px; opacity: 0.8; }
  100% { r: 20px; opacity: 0; }
}

.pin-circle {
  fill: var(--accent-cyan);
  stroke: #0a0f1d;
  stroke-width: 2;
}

.map-pin-group.active .pin-circle {
  fill: var(--accent-amber);
}

.pin-text {
  font-size: 11px;
  font-weight: 800;
  fill: #0a0f1d;
  text-anchor: middle;
}

.pin-badge-bg {
  fill: rgba(10, 15, 29, 0.85);
  stroke: rgba(56, 189, 248, 0.4);
  stroke-width: 1;
}

.pin-badge-text {
  font-size: 9px;
  font-weight: 600;
  fill: var(--text-main);
  text-anchor: middle;
}

/* Map Pin Detail Sheet */
.map-detail-sheet {
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.map-detail-sheet.hidden {
  display: none;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 0 auto 10px auto;
}

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

.sheet-idx-badge {
  font-size: 11px;
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-amber);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.sheet-time {
  font-size: 12px;
  color: var(--text-sub);
}

.sheet-title {
  font-size: 16px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 4px;
}

.sheet-note {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
}

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

/* Route List Items */
.route-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.route-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(28, 39, 62, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.route-item-card:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--border-active);
}

.route-step-num {
  width: 28px;
  height: 28px;
  background: var(--accent-cyan);
  color: #0a0f1d;
  font-weight: 800;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.route-step-info {
  flex: 1;
}

.route-step-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-step-time {
  font-size: 11px;
  color: var(--accent-amber);
}

.route-step-title {
  font-size: 14px;
  color: var(--text-main);
}

.route-step-note {
  font-size: 12px;
  color: var(--text-sub);
}

.route-map-btn {
  font-size: 16px;
  text-decoration: none;
  padding: 4px;
}

