/* Parámetros — Atenea steel (misma cáscara que Finalizar / Exportar) + box cian */

.btn-parametros {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.btn-parametros:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
}
.btn-parametros i { font-size: 14px; }

.overlay-parametros {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay-parametros.visible { display: flex; }

/* Layout; cáscara → atenea-chrome. Solo el body scrollea (footer/firma fijos). */
.overlay-parametros .parametros-modal {
  position: relative;
  width: min(430px, 92vw);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 20px 20px 14px;
  overflow: hidden;
}

.overlay-parametros .parametros-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
}

.overlay-parametros .parametros-modal > h2 {
  margin: 0 0 4px;
  padding-right: 28px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  font-family: inherit;
  flex: 0 0 auto;
}

.parametros-sub {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.35;
  color: #8b97a8;
  font-family: inherit;
  flex: 0 0 auto;
}

/* Zona scrolleable: ocupa el resto del modal y hace scroll de verdad */
.parametros-body-wrap {
  position: relative;
  min-width: 0;
  flex: 1 1 0%;
  min-height: 140px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #2a3d52 transparent;
}
.parametros-body-wrap::-webkit-scrollbar { width: 6px; }
.parametros-body-wrap::-webkit-scrollbar-thumb {
  background: #2a3d52;
  border-radius: 6px;
}
.parametros-body {
  min-width: 0;
  padding-bottom: 8px;
}

.param-sections {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.param-section {
  width: 100%;
  max-width: 390px;
  margin: 4px auto 10px;
}

.param-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.param-section-title .fa-solid {
  color: #4fc3f7;
  font-size: 13px;
  flex-shrink: 0;
}
.param-section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #a8b8c8;
  flex: 1;
  min-width: 0;
}

.param-section-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Ayuda: mismo look que la i de matriz (info-conductor-hint) */
.param-help {
  margin: 0;
  border: none;
  background: transparent;
}
.param-help > summary.param-section-title {
  margin-bottom: 10px;
}
.param-help[open] > summary.param-section-title {
  margin-bottom: 8px;
}
.param-help > summary {
  list-style: none;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  user-select: none;
  margin-bottom: 0;
}
.param-help > summary::-webkit-details-marker { display: none; }
.param-help > summary .param-section-label {
  cursor: default;
}
.param-help > summary .param-help-q {
  cursor: pointer;
  margin-left: auto;
}
.param-help > summary:focus-visible .param-help-q {
  outline: none;
}
.param-help-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid #3d4155;
  border-radius: 50%;
  background: transparent;
  color: #5c6578;
  font-size: 8.5px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.param-help > summary:hover .param-help-q,
.param-help[open] > summary .param-help-q {
  color: var(--atenea-cyan, #4fc3f7);
  border-color: var(--atenea-cyan, #4fc3f7);
}
.param-help-body {
  margin: 0 0 10px;
  padding: 0 0 10px 21px;
  font-size: 11px;
  color: #8ea1b5;
  line-height: 1.5;
  border: none;
  border-bottom: 1px solid rgba(79, 195, 247, 0.18);
  background: transparent;
}
.param-help-body p {
  margin: 0 0 7px;
}
.param-help-body p:last-child {
  margin-bottom: 0;
}
.param-help-h {
  display: block;
  margin-bottom: 1px;
  font-size: 11px;
  font-weight: 600;
  color: #c5d0e0;
}
.param-help-body ul {
  margin: 0 0 7px;
  padding-left: 16px;
}
.param-help-body li + li {
  margin-top: 2px;
}
.param-help-body code {
  color: #8eb8cc;
  background: rgba(79, 195, 247, 0.06);
  padding: 0 3px;
  border-radius: 2px;
  font-size: 10px;
}

.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

.param-delay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.param-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.param-field label {
  font-size: 10px;
  color: #8ea1b5;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.param-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  color: #a8b8c8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  outline: none;
  text-align: center;
  min-height: 22px;
  height: 22px;
  line-height: 1.2;
}
.param-field input:focus {
  border-color: #4fc3f7aa;
}
.param-field input::placeholder {
  color: #5a6575;
  opacity: 0.85;
  font-weight: 400;
}
.param-field input:focus::placeholder {
  color: transparent;
  opacity: 0;
}

.param-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.param-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #6b7c8f;
  line-height: 1.5;
}

.param-enable {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  color: #a8b8c8;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
}
.param-enable input {
  margin: 0;
  accent-color: #4fc3f7;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.parametros-msg {
  margin: 6px 0 0;
  font-size: 11px;
  color: #94a3b8;
  min-height: 0;
  flex-shrink: 0;
}
.parametros-msg--err { color: #f44336; }

.param-section--danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(244, 67, 54, 0.35);
}
.param-section-title-static {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ef9a9a;
  cursor: default;
}
.param-danger-copy {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
}
.btn-hard-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(244, 67, 54, 0.55);
  border-radius: 6px;
  background: rgba(244, 67, 54, 0.12);
  color: #ef9a9a;
  font-size: 11px;
  cursor: pointer;
}
.btn-hard-reset:hover:not(:disabled) {
  background: rgba(244, 67, 54, 0.22);
  color: #ffcdd2;
}
.btn-hard-reset:disabled {
  opacity: 0.55;
  cursor: wait;
}

.parametros-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(61, 74, 92, 0.55);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Footer buttons más legibles en este modal */
.overlay-parametros .parametros-footer .btn-modal-muted {
  color: #a8b4c4;
  border-color: #5a6a7d;
}
.overlay-parametros .parametros-footer .btn-modal-primary {
  color: #d6dee8;
  border-color: rgba(136, 152, 168, 0.65);
  background: rgba(96, 125, 139, 0.22);
}

.overlay-parametros .parametros-firma {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 2px 2px;
  user-select: none;
  pointer-events: none;
  flex-shrink: 0;
  opacity: 0.7;
}

@media (max-width: 420px) {
  .param-grid { grid-template-columns: 1fr; }
  .param-delay-grid { grid-template-columns: 1fr; }
}
