/* ============================================================
   SITHIYAM OS — SMART START v1
   New-quote entry modal: Scratch / Template / Presets / AI
   Matches nd-prototype-smartstart.html v6.1 design system
   ============================================================ */

/* ── Overlay / scrim ──────────────────────────────────────── */
.ss-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--scrim);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  animation: ssFadeIn 180ms var(--ease);
}
@keyframes ssFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Modal shell ─────────────────────────────────────────── */
.ss-modal {
  width: 100%; max-width: 480px;
  background: var(--bg-1); border: 1px solid var(--b2);
  border-radius: var(--r3); box-shadow: var(--sh3);
  overflow: hidden;
  animation: ssSlideUp 220ms var(--ease);
}
@keyframes ssSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ──────────────────────────────────────────────── */
.ss-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--b1);
  text-align: center; position: relative;
}
.ss-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-metal);
}
.ss-greeting {
  font-family: var(--fd); font-size: 22px; font-weight: 400;
  color: var(--t1); margin-bottom: 4px;
}
.ss-sub { font-size: 12px; color: var(--t3); }
.ss-sub strong { color: var(--t1); font-weight: 600; }

/* ── Choice panel ────────────────────────────────────────── */
.ss-body { padding: 20px 24px 28px; }

.ss-choice {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--b1);
  border-radius: var(--r2); cursor: pointer;
  margin-bottom: 10px;
  transition: border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
  background: var(--bg-1); position: relative; overflow: hidden;
}
.ss-choice:hover {
  border-color: var(--b3); box-shadow: var(--sh1);
  transform: translateY(-2px);
}
.ss-choice:active { transform: translateY(0); }

.ss-choice-icon {
  width: 44px; height: 44px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.ss-choice-icon.blank    { background: var(--accent-ghost); border: 1px solid var(--accent-ring); }
.ss-choice-icon.template { background: var(--blue-bg);      border: 1px solid rgba(107,154,184,.2); }
.ss-choice-icon.preset   { background: var(--green-bg);     border: 1px solid rgba(56,180,120,.2); }
.ss-choice-icon.ai       { background: var(--violet-bg);    border: 1px solid rgba(148,120,200,.2); }

.ss-choice-title {
  font-family: var(--fu); font-size: 11px; font-weight: 800;
  color: var(--t1); letter-spacing: .04em; margin-bottom: 3px;
}
.ss-choice-desc { font-size: 11px; color: var(--t3); line-height: 1.5; }

.ss-choice-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--t4);
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.ss-choice:hover .ss-choice-arrow {
  color: var(--accent);
  transform: translateY(-50%) translateX(3px);
}

.ss-cancel {
  display: block; text-align: center; font-size: 11px;
  color: var(--t4); cursor: pointer; padding: 8px 0 4px;
  transition: color var(--dur-fast);
}
.ss-cancel:hover { color: var(--t2); }

/* ── Shared sub-panel header ─────────────────────────────── */
.ss-panel-header {
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--b1);
}
.ss-panel-heading {
  font-family: var(--fu); font-size: 11px; font-weight: 800;
  color: var(--t1); letter-spacing: .04em; margin-bottom: 2px;
}
.ss-panel-count { font-size: 11px; color: var(--t3); }

/* ── Shared action bar ───────────────────────────────────── */
.ss-actions {
  display: flex; gap: 8px; justify-content: space-between;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--b1);
}

/* ── Shared buttons ──────────────────────────────────────── */
.ss-btn-back {
  padding: 9px 20px; border-radius: var(--rp);
  border: 1px solid var(--b2); background: var(--bg-2);
  font-family: var(--fu); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--t2); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.ss-btn-back:hover { background: var(--bg-3); color: var(--t1); border-color: var(--b3); }

.ss-btn-apply {
  padding: 9px 22px; border-radius: var(--rp);
  border: none; cursor: pointer;
  font-family: var(--fu); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent-metal); color: #080706;
  box-shadow: var(--sh1), var(--sh-inner);
  position: relative; overflow: hidden;
  transition: filter var(--dur-fast), transform var(--dur-fast);
}
.ss-btn-apply::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, transparent 55%);
  pointer-events: none;
}
.ss-btn-apply:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ss-btn-apply:active { filter: brightness(.95); transform: translateY(0); }
.ss-btn-apply.teal {
  background: linear-gradient(160deg, #5AC0B8 0%, #2A8A80 60%, #40A898 100%);
}
[data-theme="light"] .ss-btn-apply { color: #fff; }
[data-theme="light"] .ss-btn-apply.teal { color: #fff; }

/* ── Empty states ────────────────────────────────────────── */
.ss-empty {
  text-align: center; padding: 44px 24px;
}
.ss-empty-icon { font-size: 44px; margin-bottom: 12px; opacity: .45; }
.ss-empty-title {
  font-family: var(--fd); font-size: 20px; font-weight: 400;
  color: var(--t2); margin-bottom: 6px;
}
.ss-empty-desc {
  font-size: 12px; color: var(--t4); line-height: 1.6;
  max-width: 270px; margin: 0 auto;
}

/* ── Template browser ────────────────────────────────────── */
.ss-tpl-cols {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 280px; max-height: 360px;
}
.ss-tpl-list-col {
  border-right: 1px solid var(--b1);
  overflow-y: auto;
  overscroll-behavior: contain; /* PE_FIX_2026_04_20_SS_SCROLL_LOCK */
}
.ss-tpl-preview-col { overflow-y: auto; overscroll-behavior: contain; }

.tpl-list { padding: 8px 12px; }
.tpl-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 12px; border: 1px solid var(--b1);
  border-radius: var(--r2); cursor: pointer;
  margin-bottom: 7px;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
  background: var(--bg-1);
}
.tpl-card:hover { border-color: var(--b3); box-shadow: var(--sh1); }
.tpl-card.selected { border-color: var(--accent); background: var(--accent-ghost); }

.tpl-icon {
  width: 36px; height: 36px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; background: var(--bg-3);
  border: 1px solid var(--b1); flex-shrink: 0;
}
.tpl-info { flex: 1; min-width: 0; }
.tpl-name {
  font-family: var(--fu); font-size: 10px; font-weight: 800;
  color: var(--t1); letter-spacing: .04em; margin-bottom: 3px;
}
.tpl-route {
  font-size: 10px; color: var(--t3); margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.tpl-badge {
  padding: 2px 7px; border-radius: var(--rp);
  font-size: 8px; font-weight: 800; font-family: var(--fu);
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg-3); color: var(--t4);
}
.tpl-badge.nights { background: var(--accent-ghost); color: var(--accent); }
.tpl-badge.pax    { background: var(--blue-bg);      color: var(--blue); }

/* Template preview */
.tpl-preview { padding: 18px 20px 20px; }
.tpl-preview-title {
  font-family: var(--fd); font-size: 20px; font-weight: 400;
  color: var(--t1); margin-bottom: 8px;
}
.tpl-preview-route {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--t2);
  padding: 8px 12px; border-radius: var(--r1);
  background: var(--bg-2); border: 1px solid var(--b1);
  margin-bottom: 14px;
}
.tpl-day-list { margin-bottom: 14px; }
.tpl-day-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--b0); font-size: 11px;
}
.tpl-day-num {
  font-family: var(--fd); font-size: 14px; font-weight: 300;
  color: var(--accent); width: 26px; text-align: center; flex-shrink: 0;
}
.tpl-day-city { flex: 1; font-weight: 500; color: var(--t1); }
.tpl-day-hotel {
  font-size: 10px; color: var(--t3);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 110px;
}
.tpl-prompt {
  font-size: 12px; color: var(--t4); text-align: center;
  padding: 60px 16px;
}

/* ── Preset assembler ────────────────────────────────────── */
.pst-list { padding: 8px 16px; max-height: 300px; overflow-y: auto; }
.pst-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--b1);
  border-radius: var(--r2); cursor: pointer;
  margin-bottom: 8px; position: relative;
  transition: border-color var(--dur-base);
  background: var(--bg-1);
}
.pst-card:hover { border-color: var(--b3); }
.pst-card.selected { border-color: var(--green); background: var(--green-bg); }

.pst-card-order {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-family: var(--fu); font-size: 9px; font-weight: 800;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--sh1);
}
.pst-card.selected .pst-card-order { display: flex; }

.pst-icon {
  width: 34px; height: 34px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: var(--bg-3);
  border: 1px solid var(--b1); flex-shrink: 0;
}
.pst-info { flex: 1; min-width: 0; }
.pst-name {
  font-family: var(--fu); font-size: 10px; font-weight: 800;
  color: var(--t1); letter-spacing: .04em; margin-bottom: 2px;
}
.pst-cities { font-size: 10px; color: var(--t3); margin-bottom: 4px; }
.pst-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.pst-tag {
  padding: 2px 7px; border-radius: var(--rp);
  font-size: 7px; font-weight: 800; font-family: var(--fu);
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg-3); color: var(--t4);
}
.pst-tag.hotel { background: var(--blue-bg);      color: var(--blue); }
.pst-tag.board { background: var(--accent-ghost); color: var(--accent); }
.pst-tag.pace  { background: var(--green-bg);     color: var(--green); }

.pst-counter {
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--b1); background: var(--bg-2);
}
.pst-counter-text { font-size: 11px; color: var(--t3); }
.pst-counter-num {
  font-family: var(--fd); font-size: 18px; font-weight: 300; color: var(--accent);
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ss-overlay { padding: 16px; align-items: flex-end; }
  .ss-modal {
    border-radius: var(--r2) var(--r2) 0 0;
    max-width: 100%;
  }
  .ss-header { padding: 20px 20px 16px; }
  .ss-greeting { font-size: 18px; }
  .ss-body { padding: 14px 16px 20px; }
  .ss-choice { padding: 12px 14px; gap: 10px; }
  .ss-choice-title { font-size: 10px; }
  .ss-choice-desc { font-size: 10px; }
  .ss-tpl-cols { grid-template-columns: 1fr; }
  .ss-tpl-list-col { border-right: none; border-bottom: 1px solid var(--b1); max-height: 200px; }
}
