/* Toggle operativo en listado Contratos (estilo inq-tel-wa-toggle, ícono ✓) */

.con-plan-op-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0 0 0 6px;
  padding: 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(148, 163, 184, 0.38);
  opacity: 0.72;
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.18s ease, opacity 0.18s ease, filter 0.18s ease, transform 0.12s ease;
}

.con-plan-op-toggle__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.con-plan-op-toggle:hover:not(:disabled) {
  color: rgba(37, 211, 102, 0.72);
  opacity: 1;
}

.con-plan-op-toggle--on {
  color: #25d366;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.45));
}

.con-plan-op-toggle--on:hover:not(:disabled) {
  color: #2ee06a;
  filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.55));
}

.con-plan-op-toggle:active:not(:disabled) {
  transform: scale(0.94);
}

.con-plan-op-toggle:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 0 2px rgba(37, 211, 102, 0.35));
}

.con-plan-op-toggle:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  filter: none;
}

.nd-con-listado-estado-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.nd-con-plan-op-counter {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: rgba(148, 163, 184, 0.12);
}

.nd-con-plan-op-counter--warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.plan-grace-banner {
  margin: 0 0 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.plan-grace-banner__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

html.theme-f10 .con-plan-op-toggle {
  color: rgba(168, 162, 158, 0.42);
}

html.theme-f10 .con-plan-op-toggle--on {
  color: #4ade80;
  filter: drop-shadow(0 0 7px rgba(74, 222, 128, 0.42));
}

.billing-downgrade-modal__field {
  margin: 14px 0 0;
}

.billing-downgrade-modal__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.billing-downgrade-modal__field input {
  width: 100%;
}

/* Modal cambio de plan (subida / bajada) */
.nd-modal--billing-plan-change {
  max-width: 440px;
}

.billing-plan-change-modal__root {
  min-height: 0;
}

.billing-plan-change-modal {
  --bpcm-text: var(--text);
  --bpcm-muted: var(--muted);
  --bpcm-border: var(--border);
  --bpcm-plan-bg: rgba(148, 163, 184, 0.08);
  --bpcm-accent: #2563eb;
  --bpcm-accent-soft: rgba(37, 99, 235, 0.1);
  --bpcm-accent-border: rgba(37, 99, 235, 0.38);
  --bpcm-note-bg: rgba(148, 163, 184, 0.1);
  --bpcm-note-accent: rgba(37, 99, 235, 0.45);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--bpcm-text);
}

.billing-plan-change-modal--downgrade {
  --bpcm-accent: #d97706;
  --bpcm-accent-soft: rgba(217, 119, 6, 0.12);
  --bpcm-accent-border: rgba(217, 119, 6, 0.42);
  --bpcm-note-accent: rgba(217, 119, 6, 0.5);
}

.billing-plan-change-modal__plans {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.billing-plan-change-modal__plan {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--bpcm-border);
  background: var(--bpcm-plan-bg);
}

.billing-plan-change-modal__plan--to {
  border-color: var(--bpcm-accent-border);
  background: var(--bpcm-accent-soft);
}

.billing-plan-change-modal__plan--to .billing-plan-change-modal__plan-label {
  color: var(--bpcm-accent);
}

.billing-plan-change-modal__plan--to .billing-plan-change-modal__plan-meta {
  color: var(--bpcm-accent);
  opacity: 0.88;
}

.billing-plan-change-modal__plan-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bpcm-muted);
}

.billing-plan-change-modal__plan strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bpcm-text);
}

.billing-plan-change-modal__plan-meta {
  font-size: 12px;
  color: var(--bpcm-muted);
  line-height: 1.35;
}

.billing-plan-change-modal .billing-shop-plan__name--esencial {
  color: #059669;
}

.billing-plan-change-modal .billing-shop-plan__name--profesional {
  color: #2563eb;
}

.billing-plan-change-modal .billing-shop-plan__name--empresa {
  color: #7c3aed;
}

.billing-plan-change-modal .billing-shop-plan__name--escala {
  color: #d97706;
}

.billing-plan-change-modal__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--bpcm-accent);
  opacity: 0.82;
  padding-top: 18px;
}

.billing-plan-change-modal__details {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.billing-plan-change-modal__details > div {
  display: grid;
  grid-template-columns: minmax(0, 42%) 1fr;
  gap: 8px 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--bpcm-border);
}

.billing-plan-change-modal__details > div:last-child {
  border-bottom: none;
}

.billing-plan-change-modal__details dt {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--bpcm-muted);
}

.billing-plan-change-modal__details dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  color: var(--bpcm-text);
}

.billing-plan-change-modal__detail-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bpcm-muted);
}

.billing-plan-change-modal__detail-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.billing-plan-change-modal__detail-tag--ok {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.billing-plan-change-modal__detail-tag--warn {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.billing-plan-change-modal__note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bpcm-note-bg);
  border-left: 3px solid var(--bpcm-note-accent);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--bpcm-muted);
}

.billing-plan-change-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

.billing-plan-change-modal__btn {
  min-width: 118px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.billing-plan-change-modal__btn:active {
  transform: scale(0.98);
}

.billing-plan-change-modal__btn--cancel {
  background: transparent;
  border-color: var(--bpcm-border);
  color: var(--bpcm-text);
}

.billing-plan-change-modal__btn--cancel:hover {
  background: var(--bpcm-plan-bg);
}

.billing-plan-change-modal__btn--confirm {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.billing-plan-change-modal__btn--confirm:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.billing-plan-change-modal__btn--confirm-downgrade {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.28);
}

.billing-plan-change-modal__btn--confirm-downgrade:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
}

/* Caramelo claro */
html.theme-f5 .billing-plan-change-modal {
  --bpcm-plan-bg: rgba(255, 255, 255, 0.72);
  --bpcm-border: rgba(60, 54, 48, 0.14);
  --bpcm-note-bg: rgba(255, 255, 255, 0.55);
}

html.theme-f5 .billing-plan-change-modal--upgrade {
  --bpcm-accent-soft: rgba(37, 99, 235, 0.1);
  --bpcm-accent-border: rgba(37, 99, 235, 0.32);
}

html.theme-f5 .billing-plan-change-modal--downgrade {
  --bpcm-accent-soft: rgba(217, 119, 6, 0.12);
  --bpcm-accent-border: rgba(217, 119, 6, 0.36);
}

html.theme-f5 .billing-plan-change-modal .billing-shop-plan__name--esencial {
  color: #047857;
}

html.theme-f5 .billing-plan-change-modal .billing-shop-plan__name--profesional {
  color: #1d4ed8;
}

html.theme-f5 .billing-plan-change-modal .billing-shop-plan__name--empresa {
  color: #6d28d9;
}

html.theme-f5 .billing-plan-change-modal .billing-shop-plan__name--escala {
  color: #b45309;
}

html.theme-f5 .billing-plan-change-modal__detail-tag--ok {
  background: rgba(22, 101, 52, 0.12);
  color: #166534;
}

html.theme-f5 .billing-plan-change-modal__detail-tag--warn {
  background: rgba(161, 98, 7, 0.12);
  color: #92400e;
}

/* Carbón */
html.theme-f10 .billing-plan-change-modal {
  --bpcm-plan-bg: rgba(255, 255, 255, 0.04);
  --bpcm-border: rgba(255, 255, 255, 0.08);
  --bpcm-note-bg: rgba(255, 255, 255, 0.05);
}

html.theme-f10 .billing-plan-change-modal--upgrade {
  --bpcm-accent-soft: rgba(37, 99, 235, 0.14);
  --bpcm-accent-border: rgba(96, 165, 250, 0.38);
}

html.theme-f10 .billing-plan-change-modal--downgrade {
  --bpcm-accent: #fbbf24;
  --bpcm-accent-soft: rgba(251, 191, 36, 0.12);
  --bpcm-accent-border: rgba(251, 191, 36, 0.38);
  --bpcm-note-accent: rgba(251, 191, 36, 0.55);
}

html.theme-f10 .billing-plan-change-modal .billing-shop-plan__name--esencial {
  color: #6ee7b7;
}

html.theme-f10 .billing-plan-change-modal .billing-shop-plan__name--profesional {
  color: #93c5fd;
}

html.theme-f10 .billing-plan-change-modal .billing-shop-plan__name--empresa {
  color: #c4b5fd;
}

html.theme-f10 .billing-plan-change-modal .billing-shop-plan__name--escala {
  color: #fbbf24;
}

html.theme-f10 .billing-plan-change-modal__detail-tag--ok {
  background: rgba(110, 231, 183, 0.14);
  color: #6ee7b7;
}

html.theme-f10 .billing-plan-change-modal__detail-tag--warn {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
}

@media (max-width: 480px) {
  .billing-plan-change-modal__plans {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .billing-plan-change-modal__arrow {
    padding: 0;
    transform: rotate(90deg);
  }

  .billing-plan-change-modal__details > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .billing-plan-change-modal__details dd {
    text-align: left;
  }

  .billing-plan-change-modal__actions {
    flex-direction: column-reverse;
  }

  .billing-plan-change-modal__btn {
    width: 100%;
  }
}
