/* style.css — калькулятор КП v2
   Простая, читаемая карточка. Палитра индиго (как в v1), чтобы узнаваться. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 60%);
  color: #1f2437;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.app { width: 100%; max-width: 560px; }

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.12);
  padding: 28px 26px;
  animation: fade .25s ease;
}

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

.hidden { display: none !important; }

h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.3rem; margin: 0 0 12px; }
.muted { color: #6b7280; font-size: .9rem; }

.big-emoji { font-size: 2.6rem; text-align: center; margin: 8px 0; }

/* ---- шаг 0: выбор типа ---- */
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.type-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  text-align: center;
}
.type-card:hover { border-color: #6366f1; box-shadow: 0 4px 14px rgba(99, 102, 241, .18); }
.type-emoji { font-size: 2rem; }
.type-name { font-weight: 700; margin: 6px 0 4px; }
.type-desc { font-size: .8rem; color: #6b7280; }

select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d1d5db; margin-bottom: 12px; font-size: 1rem; }

/* ---- прогресс ---- */
.progress-track { height: 6px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 4px; transition: width .3s; }
.counter { font-size: .78rem; color: #6b7280; margin-bottom: 10px; }

.q-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; min-height: 1.4em; }

/* ---- опции ---- */
.opts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.opt-btn, .opt {
  border: 1.5px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt-btn:hover, .opt:hover { border-color: #818cf8; }
.opt-btn.selected, .opt.selected { border-color: #6366f1; background: #eef2ff; }
.opt { display: flex; align-items: center; gap: 10px; }
.opt input { accent-color: #6366f1; width: 18px; height: 18px; }
.tariff-name { font-weight: 700; }
.tariff-price { color: #4338ca; font-weight: 600; }
.tariff-note { font-size: .8rem; }

/* ---- поля ввода ---- */
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 1rem; }

.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: #4b5563; margin: 12px 0; }
.check-row input { accent-color: #6366f1; width: 16px; height: 16px; margin-top: 2px; }
.pd-quote { font-size: .8rem; color: #6b7280; margin: 12px 0; }

/* ---- навигация ---- */
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.btn {
  border: none; border-radius: 10px; padding: 12px 18px; font-size: 1rem;
  background: #6366f1; color: #fff; cursor: pointer; transition: background .15s, opacity .15s;
}
.btn:hover { background: #4f46e5; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: #fff; color: #4b5563; border: 1.5px solid #e5e7eb; }
.btn.ghost:hover { border-color: #c7c9f5; background: #f5f6ff; }

/* ---- результат ---- */
.score-pill { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; margin-bottom: 10px; }
.price-vilka { font-size: 1.9rem; font-weight: 800; color: #3730a3; margin: 6px 0; }
.block { background: #f8fafc; border-radius: 10px; padding: 12px 16px; margin-top: 8px; }
.block-title { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.block ul { margin: 0; padding-left: 18px; font-size: .88rem; color: #374151; }
.consult-hint { margin-top: 10px; font-size: .85rem; background: #ecfdf5; color: #065f46; padding: 10px; border-radius: 10px; }

/* ---- оператор (плавающая кнопка созвона/поддержки) ---- */
.operator-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  display: inline-flex; align-items: center; gap: 6px;
  background: #6366f1; color: #fff; text-decoration: none;
  padding: 11px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
}
.operator-btn:hover { background: #4f46e5; }

@media (max-width: 420px) {
  .type-cards { grid-template-columns: 1fr; }
  .card { padding: 20px 16px; }
}