/* ══════════════════════════════════════════
   COTIZADOR — panel lateral
══════════════════════════════════════════ */

.lp-cotizador {
  margin-top: 4px;
}

.lp-cotizador.hidden {
  display: none !important;
}

.cotizador-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue, #0055a5);
  margin-bottom: 10px;
}

.cotizador-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--yellow, #f5c518);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -2px;
}

.cot-fase-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--blue-dark, #003d73);
  background: var(--blue-light, #e6f0fa);
  border: 1px solid rgba(0, 85, 165, 0.2);
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.cot-grid {
  display: grid;
  gap: 8px;
}

.cot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.cot-row-label {
  color: var(--gray-600, #475569);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cot-row-value {
  font-weight: 700;
  color: var(--gray-900, #0f172a);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.84rem;
}

.cot-row-value--blue {
  color: var(--blue, #0055a5);
}

.cot-row-value--highlight {
  font-size: 1rem;
  color: var(--blue, #0055a5);
}

.cot-total-box {
  background: linear-gradient(135deg, rgba(0, 85, 165, 0.06), rgba(245, 197, 24, 0.08));
  border: 1px solid rgba(0, 85, 165, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
}

.cot-slider-block {
  margin-top: 12px;
}

.cot-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.cot-slider-head label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600, #475569);
}

.cot-slider-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--blue, #0055a5);
  font-family: 'DM Mono', ui-monospace, monospace;
}

.cot-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200, #e2e8f0);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.cot-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue, #0055a5);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 85, 165, 0.35);
}

.cot-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue, #0055a5);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 85, 165, 0.35);
}

.cot-range-hint {
  font-size: 0.65rem;
  color: var(--gray-500, #64748b);
  margin-top: 4px;
}

.cot-result-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--gray-900, #0f172a);
  color: #fff;
}

.cot-result-card .cot-row-label {
  color: rgba(255, 255, 255, 0.65);
}

.cot-result-card .cot-row-value {
  color: #fff;
}

.cot-result-card .cot-cuota {
  font-size: 1.10rem;
  font-weight: 800;
  color: var(--yellow, #f5c518);
}

.cot-unavailable {
  font-size: 0.8rem;
  color: var(--gray-500, #64748b);
  font-style: italic;
  padding: 8px 0;
}

.cot-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.cot-wa-btn:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
}

.cot-wa-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Admin config del cotizador */
.cot-admin-config {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-300, #cbd5e1);
}

.cot-admin-config.hidden {
  display: none !important;
}

.cot-admin-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-700, #334155);
  margin-bottom: 10px;
}

.cot-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cot-admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cot-admin-field span {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-500, #64748b);
  text-transform: uppercase;
}

.cot-admin-field input {
  padding: 6px 8px;
  border: 1px solid var(--gray-300, #cbd5e1);
  border-radius: 6px;
  font-size: 0.8rem;
  width: 100%;
}

.cot-admin-field input:focus {
  outline: none;
  border-color: var(--blue, #0055a5);
  box-shadow: 0 0 0 2px rgba(0, 85, 165, 0.12);
}

.cot-admin-save {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--blue, #0055a5);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.cot-admin-save:hover {
  background: var(--blue-dark, #003d73);
}

.cot-admin-msg {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  color: var(--green, #16a34a);
  min-height: 1em;
}

/* Panel scroll — mantiene diagrama visible al desplazarse */
#lp-body {
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#lp-diagram {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .lot-panel {
    width: calc(100vw - 16px) !important;
    right: 8px !important;
    left: 8px !important;
    top: auto !important;
    bottom: 8px !important;
    max-height: calc(100dvh - 56px);
  }

  #lp-body {
    max-height: calc(100dvh - 140px);
  }

  .cot-admin-grid {
    grid-template-columns: 1fr;
  }

  #wa-float-btn {
    bottom: calc(8px + min(72vh, 520px));
  }
}

@media (max-width: 640px) {
  body:not(.dashboard-mode) .lot-panel {
    width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: auto !important;
  }
}
