/* Modal interés punitorio — paleta wizard cobranzas v2 (cob-w2-*) */

.modal-card--punitorio.punitorio-modal {
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(186, 168, 142, 0.22);
  border-radius: 12px;
  background: linear-gradient(165deg, #44403c 0%, #353332 32%, #2e2b29 58%, #201e1c 100%);
  color: #eae8e6;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 1px 1px 0 rgba(255, 255, 255, 0.04);
}

.punitorio-modal__head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(186, 168, 142, 0.14);
  background: linear-gradient(
    165deg,
    rgba(90, 82, 76, 0.42) 0%,
    rgba(58, 56, 54, 0.88) 45%,
    rgba(36, 34, 32, 0.96) 100%
  );
}

.punitorio-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #faf8f6 0%, #e8ddd0 50%, #dccab0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.punitorio-modal__lead {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.punitorio-modal__more {
  margin: 0 1rem;
  padding: 0;
  border: none;
  font-size: 0.75rem;
  color: var(--muted);
}

.punitorio-modal__more summary {
  cursor: pointer;
  padding: 0.55rem 0 0.25rem;
  list-style: none;
  user-select: none;
}

.punitorio-modal__more summary::-webkit-details-marker {
  display: none;
}

.punitorio-modal__more summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.punitorio-modal__more[open] summary::before {
  transform: rotate(90deg);
}

.punitorio-modal__more summary:hover {
  color: #dccab0;
}

.punitorio-modal__more ul {
  margin: 0 0 0.5rem 1.1em;
  padding: 0;
  line-height: 1.5;
  color: var(--muted);
}

.punitorio-modal__body {
  padding: 0.65rem 1rem 0;
}

.punitorio-modal__capital {
  margin-bottom: 0.85rem;
}

.punitorio-modal__capital label,
.punitorio-modal .form-grid--punitorio label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.punitorio-modal__capital input {
  width: 100%;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.16) 100%);
  color: #eae8e6;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.punitorio-modal__capital input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.punitorio-modal .form-grid--punitorio {
  margin-top: 0;
  gap: 0.75rem 0.85rem;
}

.punitorio-modal .form-grid--punitorio select,
.punitorio-modal .form-grid--punitorio input[type="number"],
.punitorio-modal .form-grid--punitorio input[type="date"] {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.1) 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28);
}

/* Lista nativa del desplegable — tonos del panel wizard (evita blanco sobre blanco). */
.punitorio-modal select option {
  background-color: #3a3836;
  color: #eae8e6;
}

.punitorio-modal__method-hint {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #d6d3d1;
  background: linear-gradient(165deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.08) 100%);
  border-radius: 8px;
  border: 1px solid rgba(186, 168, 142, 0.14);
  border-left: 3px solid rgba(186, 168, 142, 0.45);
}

.punitorio-modal__method-hint.hidden {
  display: none;
}

.punitorio-modal__result {
  margin: 0.85rem 1rem 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed rgba(186, 168, 142, 0.22);
  background: linear-gradient(165deg, rgba(62, 58, 54, 0.62) 0%, rgba(40, 38, 36, 0.72) 100%);
  min-height: 3.25rem;
  display: flex;
  align-items: center;
}

.punitorio-modal__result--idle {
  justify-content: center;
}

.punitorio-modal__result-placeholder {
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.punitorio-modal__result--ok {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.08) 100%);
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.punitorio-modal__result-method {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 185, 129, 0.95);
}

.punitorio-modal__result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin: 0;
}

.punitorio-modal__result-grid > div {
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.08) 100%);
  border: 1px solid rgba(186, 168, 142, 0.1);
}

.punitorio-modal__result-grid dt {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.punitorio-modal__result-grid dd {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #eae8e6;
}

.punitorio-modal__result-total dd {
  font-size: 1.0625rem;
  color: rgba(16, 185, 129, 0.95);
}

.punitorio-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0.7rem 1rem;
  margin-top: 0.85rem;
  border-top: 1px solid rgba(186, 168, 142, 0.12);
  background: linear-gradient(180deg, rgba(46, 43, 41, 0.72) 0%, rgba(28, 26, 24, 0.92) 100%);
}

.punitorio-modal__actions .btn {
  border-radius: 999px;
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
}

.punitorio-modal__actions #btnPunitorioAplicar:not(:disabled) {
  font-weight: 600;
}

/* theme-f5 — mismos criterios que cob-w2-panel / cob-w2-ipc-context */
html.theme-f5 .modal-card--punitorio.punitorio-modal {
  background: linear-gradient(165deg, #f8f3ec 0%, var(--neo-base) 55%, #e4dbd3 100%);
  border-color: rgba(161, 98, 7, 0.22);
  color: var(--text);
  box-shadow:
    10px 10px 24px var(--neo-d),
    -6px -6px 16px var(--neo-l),
    inset 1px 1px 0 rgba(255, 255, 255, 0.55);
}

html.theme-f5 .punitorio-modal__head {
  background: linear-gradient(145deg, #f5efe8 0%, var(--neo-base) 100%);
  border-bottom-color: var(--border);
}

html.theme-f5 .punitorio-modal__head h3 {
  color: var(--text);
}

html.theme-f5 .punitorio-modal__more summary:hover {
  color: #7d5e4a;
}

html.theme-f5 .punitorio-modal__capital input {
  border-color: rgba(22, 101, 52, 0.35);
  background: var(--neo-base);
  color: var(--text);
  box-shadow: inset 5px 5px 10px var(--neo-d), inset -4px -4px 9px var(--neo-l);
}

html.theme-f5 .punitorio-modal__capital input:focus {
  box-shadow: inset 3px 3px 7px var(--neo-d), inset -2px -2px 6px var(--neo-l), 0 0 0 2px rgba(22, 101, 52, 0.35);
}

html.theme-f5 .punitorio-modal select option {
  background-color: var(--neo-base);
  color: var(--text);
}

html.theme-f5 .punitorio-modal__method-hint {
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--border);
  border-left-color: rgba(156, 120, 96, 0.55);
  color: var(--muted);
  box-shadow: inset 2px 2px 5px var(--neo-d), inset -1px -1px 4px var(--neo-l);
}

html.theme-f5 .punitorio-modal__result {
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--border);
}

html.theme-f5 .punitorio-modal__result--ok {
  border-color: rgba(22, 101, 52, 0.35);
  background: linear-gradient(165deg, rgba(22, 101, 52, 0.14) 0%, rgba(22, 101, 52, 0.06) 100%);
}

html.theme-f5 .punitorio-modal__result-method,
html.theme-f5 .punitorio-modal__result-total dd {
  color: var(--ok);
}

html.theme-f5 .punitorio-modal__result-grid > div {
  background: var(--neo-base);
  border-color: var(--border);
}

html.theme-f5 .punitorio-modal__result-grid dd {
  color: var(--text);
}

html.theme-f5 .punitorio-modal__actions {
  background: linear-gradient(145deg, #f5efe8 0%, var(--neo-base) 100%);
  border-top-color: var(--border);
}

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

  .punitorio-modal__result-grid > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.5rem 0.75rem;
  }

  .punitorio-modal__result-grid dd {
    margin: 0;
  }
}
