/* assets/calculator.css - Calculadora Técnica de Rolos & Persianas Essenza Interiores */

.calc-engine-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0.5rem 0.5rem 2.5rem 0.5rem;
  animation: calcFadeIn 0.25s ease-out;
}

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

/* ─── TOPO DA CALCULADORA ─── */
.calc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: #141a26;
  border: 1.5px solid #233044;
  border-radius: 16px;
  padding: 1rem 1.4rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.calc-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.calc-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.4);
  flex-shrink: 0;
}

.calc-main-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.01em;
}

.calc-sub-title {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

/* ─── ABAS GRANDES DE TOQUE (PAPEL vs PERSIANA) ─── */
.calc-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #0d121c;
  border: 1.5px solid #202b3d;
  border-radius: 14px;
  padding: 6px;
}

.calc-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #8492a6;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.calc-mode-btn svg {
  width: 20px;
  height: 20px;
}

.calc-mode-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

/* ─── GRID DE TRABALHO: ENTRADA (ESQUERDA) + RESULTADOS (DIREITA) ─── */
.calc-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .calc-workspace-grid {
    grid-template-columns: 460px 1fr;
  }
}

/* Painel de Formulário Touch */
.calc-card-panel {
  background: #141a26;
  border: 1.5px solid #233044;
  border-radius: 18px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.calc-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1f2a3c;
}

/* Grupos de Campos */
.calc-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.calc-field-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.calc-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-input-touch {
  width: 100%;
  box-sizing: border-box;
  background: #0d121c;
  border: 1.5px solid #222f42;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s;
}

.calc-input-touch:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.calc-select-touch {
  width: 100%;
  box-sizing: border-box;
  background: #0d121c;
  border: 1.5px solid #222f42;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.calc-select-touch:focus {
  border-color: #38bdf8;
}

/* Botões de Pílulas / Opções */
.calc-pill-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calc-pill-btn {
  background: #0d121c;
  border: 1.5px solid #222f42;
  border-radius: 10px;
  padding: 8px 12px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.calc-pill-btn.active {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 800;
}

/* ─── PAINEL DE RESULTADOS E PRANCHA TÉCNICA ─── */
.calc-results-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Cartão Destaque Principal do Resultado */
.calc-hero-badge {
  background: linear-gradient(135deg, #0e1e33 0%, #0c1626 100%);
  border: 2px solid #0284c7;
  border-radius: 20px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
  flex-wrap: wrap;
  gap: 1rem;
}

.calc-hero-qty {
  font-size: 2.8rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
}

.calc-hero-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0 0 0;
}

.calc-hero-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 4px 0 0 0;
}

.calc-hero-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.calc-metric-chip {
  display: flex;
  flex-direction: column;
  background: rgba(14, 25, 42, 0.85);
  border: 1px solid #1e3352;
  border-radius: 12px;
  padding: 8px 16px;
  text-align: center;
}

.calc-metric-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #34d399;
}

.calc-metric-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Visualizador Gráfico das Faixas / Transpasses */
.calc-diagram-box {
  background: #0d121c;
  border: 1.5px solid #202b3d;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.calc-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-diagram-stage {
  width: 100%;
  height: 200px;
  background: #080c14;
  border: 1px solid #192434;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Tabela de Especificações Técnicas */
.calc-specs-table {
  width: 100%;
  border-collapse: collapse;
  background: #141a26;
  border: 1.5px solid #233044;
  border-radius: 14px;
  overflow: hidden;
}

.calc-specs-table tr {
  border-bottom: 1px solid #1d2738;
}

.calc-specs-table tr:last-child {
  border-bottom: none;
}

.calc-specs-table td {
  padding: 10px 14px;
  font-size: 0.85rem;
}

.calc-specs-table td.label {
  color: #94a3b8;
  font-weight: 700;
  width: 45%;
}

.calc-specs-table td.val {
  color: #f8fafc;
  font-weight: 800;
  text-align: right;
}

/* Botões de Ação na Base */
.calc-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-calc-action {
  flex: 1;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease;
  touch-action: manipulation;
}

.btn-calc-action:active {
  transform: scale(0.97);
}

.btn-calc-action.whatsapp {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-calc-action.quote {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-calc-action.neutral {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
}
