/* ═══════════════════════════════════════════════════════
   FURN-CALC.CSS — стили универсального калькулятора мебели
   ═══════════════════════════════════════════════════════ */

/* ─── Глобальный сброс для кнопок-карточек ─────────────── */
.fc-facade-card, .fc-hardware-card, .fc-urgency-card,
.fc-delivery-card, .fc-option-card, .fc-type-btn,
.fc-mat-card {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

/* ─── Загрузка ─────────────────────────────────────────── */
.fc-loading {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: #888;
}

/* ─── Обёртка калькулятора ─────────────────────────────── */
.fc-calculator {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .fc-calculator {
    grid-template-columns: 1fr;
  }
}

/* ─── Секция (шаг) ─────────────────────────────────────── */
.fc-section {
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(138,43,226,0.25);
}

.fc-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.fc-step-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #8A2BE2, #6a1fa8);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fc-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e8d8ff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-section-sub {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  margin: -0.5rem 0 0.75rem 0;
}

/* ─── Иконка подсказки ─────────────────────────────────── */
.fc-hint-icon {
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
}
.fc-hint-icon:hover { opacity: 1; }

/* ── Кнопка-подсказка (стиль как в ремонте) ──────────────── */
.fc-hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  background: rgba(250,204,21,0.12);
  border: 1px solid rgba(250,204,21,0.35);
  border-radius: 20px;
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.fc-hint-btn:hover {
  background: rgba(250,204,21,0.22);
  border-color: rgba(250,204,21,0.6);
  color: #fef08a;
}

/* ─── Шаг 1: Тип мебели ────────────────────────────────── */
.fc-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.6rem;
}

.fc-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.5rem;
  background: rgba(138,43,226,0.12);
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fc-type-btn:hover {
  border-color: #8A2BE2;
  background: rgba(138,43,226,0.25);
  transform: translateY(-2px);
}
.fc-type-btn.fc-active {
  border-color: #8A2BE2;
  background: rgba(138,43,226,0.3);
  box-shadow: 0 4px 16px rgba(138,43,226,0.35);
}

.fc-type-icon { font-size: 1.6rem; }
.fc-type-name { font-size: 0.75rem; font-weight: 600; color: #e8d8ff; text-align: center; }

/* ─── Шаг 2: Размеры ───────────────────────────────────── */
.fc-dim-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.fc-dim-row--area {
  gap: 0.75rem;
}

.fc-dim-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.fc-dim-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fc-dim-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid rgba(138,43,226,0.4);
  border-radius: 10px;
  overflow: hidden;
}

.fc-dim-btn {
  width: 36px;
  height: 40px;
  background: rgba(138,43,226,0.2);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #c084fc;
  font-weight: 700;
  transition: background 0.15s;
}
.fc-dim-btn:hover { background: rgba(138,43,226,0.35); }
.fc-dim-btn:active { background: rgba(138,43,226,0.5); }

.fc-dim-input {
  width: 70px;
  height: 40px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0d0ff;
  background: rgba(138,43,226,0.12);
}
.fc-dim-input::-webkit-outer-spin-button,
.fc-dim-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.fc-dim-unit {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

.fc-dim-sep {
  font-size: 1.5rem;
  color: #bbb;
  font-weight: 300;
  padding-top: 1.2rem;
}

.fc-dim-result-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(138,43,226,0.2);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  margin-top: 1.2rem;
}
.fc-dim-result-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.fc-dim-result-val   { font-size: 1.1rem; font-weight: 700; color: #c084fc; }

.fc-dim-hint-box {
  flex: 1;
  min-width: 200px;
}
.fc-dim-example {
  background: rgba(76,175,80,0.12);
  border-left: 3px solid #4caf50;
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Кнопки-переключатели для count-режима */
.fc-count-btns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.fc-count-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid rgba(138,43,226,0.4);
  border-radius: 20px;
  background: rgba(138,43,226,0.12);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c084fc;
  transition: all 0.2s;
  font-family: inherit;
}
.fc-count-btn:hover { border-color: #8A2BE2; color: #8A2BE2; }
.fc-count-btn.fc-active {
  background: #8A2BE2;
  border-color: #8A2BE2;
  color: #fff;
}

/* ─── Шаг 3: Материалы ─────────────────────────────────── */
.fc-materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.fc-material-card {
  display: block;
  padding: 0.9rem 1rem;
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(138,43,226,0.1);
}
.fc-material-card:hover {
  border-color: #8A2BE2;
  background: rgba(138,43,226,0.2);
}
.fc-material-card.fc-active {
  border-color: #8A2BE2;
  background: linear-gradient(135deg, rgba(138,43,226,0.3), rgba(106,31,168,0.35));
  box-shadow: 0 3px 10px rgba(138,43,226,0.3);
}

.fc-mat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.fc-mat-name  { font-weight: 600; font-size: 0.9rem; color: #e8d8ff; }
.fc-mat-days  { font-size: 0.75rem; color: rgba(255,255,255,0.45); white-space: nowrap; }
.fc-mat-price { font-size: 0.95rem; font-weight: 700; color: #c084fc; margin-bottom: 0.2rem; }
.fc-mat-desc  { font-size: 0.78rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ─── Шаг 4: Фасады ────────────────────────────────────── */
.fc-facade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.fc-facade-card {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(138,43,226,0.1);
}
.fc-facade-card:hover { border-color: #8A2BE2; background: rgba(138,43,226,0.2); }
.fc-facade-card.fc-active {
  border-color: #8A2BE2;
  background: linear-gradient(135deg, rgba(138,43,226,0.3), rgba(106,31,168,0.35));
  box-shadow: 0 3px 10px rgba(138,43,226,0.3);
}
.fc-facade-name  { font-weight: 600; font-size: 0.88rem; color: #e8d8ff; margin-bottom: 0.25rem; }
.fc-facade-price { font-size: 0.85rem; color: #c084fc; font-weight: 700; margin-bottom: 0.2rem; }
.fc-facade-desc  { font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ─── Шаг 5: Фурнитура ─────────────────────────────────── */
.fc-hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}

.fc-hardware-card {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(138,43,226,0.1);
}
.fc-hardware-card:hover { border-color: #8A2BE2; background: rgba(138,43,226,0.2); }
.fc-hardware-card.fc-active {
  border-color: #8A2BE2;
  background: linear-gradient(135deg, rgba(138,43,226,0.3), rgba(106,31,168,0.35));
  box-shadow: 0 3px 10px rgba(138,43,226,0.3);
}
.fc-hw-name  { font-weight: 600; font-size: 0.88rem; color: #e8d8ff; margin-bottom: 0.25rem; }
.fc-hw-price { font-size: 0.85rem; color: #c084fc; font-weight: 700; margin-bottom: 0.2rem; }
.fc-hw-desc  { font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ─── Шаг 6: Опции ─────────────────────────────────────── */
.fc-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.fc-option-card {
  display: block;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(76,175,80,0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: rgba(76,175,80,0.08);
  text-align: left;
  width: 100%;
  /* iOS: убираем 300ms задержку и нативный стиль */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  /* Фиксируем минимальную высоту чтобы карточки не схлопывались */
  min-height: 80px;
  box-sizing: border-box;
  /* Убираем position/z-index чтобы не перекрывались */
  position: static;
  z-index: auto;
  overflow: visible;
  vertical-align: top;
}
.fc-option-card:hover { border-color: #4caf50; background: rgba(76,175,80,0.15); }
.fc-option-card.fc-checked {
  border-color: #4caf50;
  background: linear-gradient(135deg, rgba(76,175,80,0.2), rgba(56,142,60,0.25));
  box-shadow: 0 3px 10px rgba(76,175,80,0.2);
}
.fc-opt-top   { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.fc-opt-icon  { font-size: 1.1rem; }
.fc-opt-name  { font-weight: 600; font-size: 0.85rem; color: #c8f0c8; }
.fc-opt-price { font-size: 0.85rem; color: #7fff7f; font-weight: 700; margin-bottom: 0.2rem; }
.fc-opt-desc  { font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ─── Шаг 7: Срочность ─────────────────────────────────── */
.fc-urgency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .fc-urgency-grid { grid-template-columns: 1fr; }
}

.fc-urgency-card {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(255,112,67,0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,112,67,0.07);
  text-align: center;
}
.fc-urgency-card:hover { border-color: #ff7043; background: rgba(255,112,67,0.15); }
.fc-urgency-card.fc-active {
  border-color: #ff7043;
  background: linear-gradient(135deg, rgba(255,112,67,0.2), rgba(230,74,25,0.25));
  box-shadow: 0 3px 10px rgba(255,112,67,0.2);
}
}
.fc-urg-name { font-weight: 700; font-size: 0.9rem; color: #ffe0d0; margin-bottom: 0.2rem; }
.fc-urg-coef { font-size: 0.9rem; color: #ff7043; font-weight: 700; margin-bottom: 0.2rem; }
.fc-urg-desc { font-size: 0.75rem; color: rgba(255,255,255,0.45); }

/* ─── Шаг 8: Доставка ──────────────────────────────────── */
.fc-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.fc-delivery-card {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(33,150,243,0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(33,150,243,0.08);
  text-align: center;
}
.fc-delivery-card:hover { border-color: #2196f3; background: rgba(33,150,243,0.15); }
.fc-delivery-card.fc-active {
  border-color: #2196f3;
  background: linear-gradient(135deg, rgba(33,150,243,0.2), rgba(21,101,192,0.25));
  box-shadow: 0 3px 10px rgba(33,150,243,0.2);
}
.fc-del-name  { font-weight: 600; font-size: 0.88rem; color: #d0e8ff; margin-bottom: 0.25rem; }
.fc-del-price { font-size: 0.9rem; color: #64b5f6; font-weight: 700; margin-bottom: 0.2rem; }
.fc-del-desc  { font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

/* ─── Правая панель ─────────────────────────────────────── */
.fc-right {
  position: sticky;
  top: 80px;
}

/* ─── Итоговая карточка ─────────────────────────────────── */
.fc-result-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, #1a0a3e 0%, #2d1b69 50%, #3d1a6e 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(138,43,226,0.25);
  border: 1px solid rgba(138,43,226,0.3);
  color: rgba(255,255,255,0.5);
}
.fc-result-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.fc-result-card {
  background: linear-gradient(135deg, #1a0a3e 0%, #2d1b69 50%, #3d1a6e 100%);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(138,43,226,0.35);
  border: 1px solid rgba(138,43,226,0.4);
  margin-bottom: 1rem;
  color: #fff;
}

.fc-result-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.fc-result-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }

.fc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.88rem;
}
.fc-res-label { color: rgba(255,255,255,0.65); flex: 1; }
.fc-res-val   { font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; }

.fc-result-row--option .fc-res-label { color: #7fff7f; }
.fc-result-row--option .fc-res-val   { color: #7fff7f; }
.fc-result-row--urgency .fc-res-val  { color: #ffaa80; }

.fc-result-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.6), transparent);
  margin: 0.75rem 0;
}

.fc-result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.fc-total-num {
  font-size: 1.6rem;
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
}

.fc-result-days {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.75rem;
}

.fc-result-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.fc-result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fc-btn-order {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #8A2BE2, #6a1fa8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.fc-btn-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138,43,226,0.3);
}

.fc-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #25d366, #1da851);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fc-btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}

/* ─── Карточка «Как мы работаем» ───────────────────────── */
.fc-how-card {
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(138,43,226,0.2);
}

.fc-how-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #e8d8ff;
  margin-bottom: 1rem;
}

.fc-how-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}
.fc-how-step:last-child { margin-bottom: 0; }
.fc-how-num {
  width: 22px;
  height: 22px;
  background: #8A2BE2;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.fc-how-step strong { display: block; margin-bottom: 0.15rem; color: #e8d8ff; }
.fc-how-step span   { color: rgba(255,255,255,0.6); line-height: 1.4; }

/* ─── Модалка подсказки ─────────────────────────────────── */
.fc-hint-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fc-hint-modal {
  background: #1e1035;
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(138,43,226,0.4);
}

.fc-hint-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8d8ff;
  margin-bottom: 1rem;
}

.fc-hint-modal-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.fc-hint-modal-close {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #8A2BE2, #6a1fa8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.fc-hint-modal-close:hover { opacity: 0.9; }
