/* ============================================================
   DVchi Planner : Stylesheet
   ============================================================ */

.dvchi-planner-wrap { font-family: 'Inter', -apple-system, sans-serif; max-width: 1000px; margin: 0 auto; }
.dvchi-planner-wrap * { box-sizing: border-box; }

.dvchi-planner-header { margin-bottom: 18px; }
.dvchi-planner-header h2 { font-size: 22px; font-weight: 700; color: #111; margin: 0 0 6px; }
.dvchi-planner-header p { font-size: 14px; color: #6b7280; margin: 0; }

.dvchi-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; margin-bottom: 16px; }

/* ── Form ─────────────────────────────────────────────── */
.dvchi-planner-form .dvchi-form-field { margin-bottom: 14px; }
.dvchi-planner-form label { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 6px; }
.dvchi-planner-form input, .dvchi-planner-form select { width: 100%; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s; }
.dvchi-planner-form input:focus, .dvchi-planner-form select:focus { border-color: #00C2D4; }
.dvchi-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Interest pills */
.dvchi-interest-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dvchi-pill { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1.5px solid #e5e7eb; border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; color: #374151; }
.dvchi-pill:has(input:checked) { background: #E0F9FC; border-color: #00C2D4; color: #0098A8; }
.dvchi-pill input { width: 14px; height: 14px; accent-color: #00C2D4; }

/* Button */
.dvchi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .2s; text-decoration: none; }
.dvchi-btn-primary { background: #00C2D4; color: #fff; border-color: #00C2D4; }
.dvchi-btn-primary:hover { background: #0098A8; border-color: #0098A8; }
.dvchi-btn-outline { background: transparent; color: #00C2D4; border-color: #00C2D4; }
.dvchi-btn-outline:hover { background: #00C2D4; color: #fff; }
.dvchi-btn-sm { padding: 7px 14px; font-size: 12px; }
.dvchi-btn-full { width: 100%; }

/* ── Plan toolbar ─────────────────────────────────────── */
.dvchi-plan-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dvchi-plan-toolbar input[type="text"] { flex: 1; min-width: 200px; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 15px; font-weight: 600; outline: none; }
.dvchi-plan-toolbar input:focus { border-color: #00C2D4; }
.dvchi-plan-toolbar-actions { display: flex; gap: 8px; }

/* ── Layout: timeline + side panel ────────────────────── */
.dvchi-plan-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.dvchi-plan-timeline { display: flex; flex-direction: column; }

/* Timeline item */
.dvchi-timeline-item { display: flex; gap: 14px; }
.dvchi-timeline-dot { width: 32px; height: 32px; border-radius: 50%; background: #00C2D4; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dvchi-rest-break .dvchi-timeline-dot { background: #F59E0B; }
.dvchi-timeline-content { flex: 1; padding-bottom: 18px; border-left: 2px dashed #e5e7eb; padding-left: 16px; margin-left: -16px; padding-top: 2px; }
.dvchi-timeline-item:last-child .dvchi-timeline-content { border-left: none; }
.dvchi-timeline-content strong { font-size: 14px; color: #111; display: block; margin-bottom: 4px; }
.dvchi-timeline-content strong a { color: inherit; text-decoration: none; }
.dvchi-timeline-content strong a:hover { color: #00C2D4; }
.dvchi-timeline-content p { font-size: 12px; color: #6b7280; margin: 2px 0; }
.dvchi-timeline-travel { font-size: 11px; color: #9ca3af; padding: 4px 0 4px 46px; font-style: italic; }

/* Stop card with remove/reorder */
.dvchi-stop-controls { display: flex; gap: 4px; margin-top: 6px; }
.dvchi-stop-controls button { background: none; border: 1px solid #e5e7eb; border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; color: #6b7280; }
.dvchi-stop-controls button:hover { border-color: #00C2D4; color: #00C2D4; }
.dvchi-stop-controls button.remove:hover { border-color: #ef4444; color: #ef4444; }

/* ── Side panel ───────────────────────────────────────── */
.dvchi-plan-side h4 { font-size: 13px; font-weight: 700; color: #111; margin: 0 0 10px; }
.dvchi-total-cost { text-align: center; font-size: 14px; color: #6b7280; margin: 10px 0 0; }
.dvchi-total-cost strong { color: #00C2D4; font-size: 18px; }

/* ── Share bar ────────────────────────────────────────── */
.dvchi-share-bar h4 { font-size: 14px; font-weight: 700; color: #111; margin: 0 0 10px; }
.dvchi-share-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dvchi-email-invite { display: flex; gap: 8px; }
.dvchi-email-invite input { flex: 1; padding: 9px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 13px; outline: none; }
.dvchi-email-invite input:focus { border-color: #00C2D4; }

/* ── Itinerary list (My Account) ─────────────────────── */
.dvchi-itinerary-list { display: flex; flex-direction: column; gap: 10px; }
.dvchi-itinerary-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 18px; flex-wrap: wrap; }
.dvchi-itinerary-info h4 { font-size: 15px; font-weight: 600; color: #111; margin: 0 0 4px; }
.dvchi-itinerary-info p { font-size: 12px; color: #6b7280; margin: 2px 0; }
.dvchi-itinerary-updated { color: #9ca3af !important; }
.dvchi-itinerary-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dvchi-empty { color: #9ca3af; font-size: 14px; padding: 30px; text-align: center; }

/* ── Notices ──────────────────────────────────────────── */
.dvchi-notice { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.dvchi-notice.success { background: #E8F8F0; color: #1A7040; border: 1px solid #6ECBA0; }
.dvchi-notice.error { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }
.dvchi-notice.info { background: #E0F9FC; color: #0C5C6B; border: 1px solid #67D8E8; }
.dvchi-login-prompt { background: #f8f8f4; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; text-align: center; font-size: 14px; }
.dvchi-login-prompt a { color: #00C2D4; font-weight: 600; }

/* ── Shared view header ───────────────────────────────── */
.dvchi-shared-header { margin-bottom: 18px; }
.dvchi-shared-header h2 { font-size: 22px; font-weight: 700; color: #111; margin: 0 0 6px; }
.dvchi-shared-header p { font-size: 13px; color: #6b7280; margin: 0; }

/* ── Add stop modal-ish inline picker ─────────────────── */
.dvchi-add-stop-panel { background: #f8f8f4; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.dvchi-add-stop-panel input { width: 100%; padding: 9px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-family: inherit; font-size: 13px; outline: none; margin-bottom: 8px; }
.dvchi-stop-search-results { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.dvchi-stop-result { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; cursor: pointer; }
.dvchi-stop-result:hover { border-color: #00C2D4; }

/* ── Print stylesheet ─────────────────────────────────── */
.dvchi-print-only { display: none; }
@media print {
  body * { visibility: hidden; }
  #dvchi-print-area, #dvchi-print-area * { visibility: visible; }
  #dvchi-print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; padding: 20px; font-family: 'Inter', sans-serif; }
  #dvchi-print-area h1 { font-size: 22px; margin-bottom: 4px; }
  #dvchi-print-area .print-meta { font-size: 12px; color: #555; margin-bottom: 16px; }
  #dvchi-print-area .print-stop { padding: 10px 0; border-bottom: 1px solid #ddd; }
  #dvchi-print-area .print-stop strong { font-size: 14px; }
  #dvchi-print-area .print-stop p { font-size: 12px; color: #555; margin: 2px 0; }
  #dvchi-print-area .print-total { margin-top: 16px; font-size: 14px; font-weight: 700; border-top: 2px solid #111; padding-top: 10px; }
  .dvchi-share-bar, .dvchi-plan-toolbar, .dvchi-planner-form, #dvchi-plan-map { display: none !important; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .dvchi-plan-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dvchi-form-row { grid-template-columns: 1fr; }
  .dvchi-itinerary-card { flex-direction: column; align-items: flex-start; }
}

/* DVchi responsive: prevent iOS auto-zoom on input focus (>=16px on phones) */
@media (max-width: 782px) {
  .dvchi-planner-form input, .dvchi-planner-form select, .dvchi-plan-toolbar input[type="text"], .dvchi-email-invite input { font-size: 16px; }
}
