/* UI compartida: costos en créditos y modal de tarifas (Enlace Escolar) */

.credit-tarifas-strip {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--th-radius-md, 12px);
  border: 1px solid var(--th-border-soft, rgba(148, 163, 184, 0.18));
  background: rgba(16, 29, 53, 0.55);
  backdrop-filter: blur(8px);
}

.credit-tarifas-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.credit-tarifas-strip__line {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--th-text-muted, #8fa4c2);
  flex: 1;
  min-width: min(100%, 240px);
}

.credit-tarifas-strip__saldo-wrap {
  color: var(--th-text, #e2ecfb);
  font-weight: 500;
}

.credit-tarifas-strip__dots {
  opacity: 0.45;
  margin: 0 0.35em;
}

.credit-tarifas-strip__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--th-radius-sm, 8px);
  border: 1px solid var(--th-border-strong, rgba(56, 189, 248, 0.24));
  background: rgba(37, 99, 235, 0.12);
  color: var(--th-accent-2, #38bdf8);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.credit-tarifas-strip__btn:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
}

.credit-tarifas-strip__btn:active {
  transform: scale(0.97);
}

.credit-tarifas-strip__btn svg {
  width: 18px;
  height: 18px;
}

.module-cost-hint {
  font-size: 11px;
  color: var(--th-text-dim, #6f85a5);
  margin-top: 6px;
  line-height: 1.35;
}

.module-cost-hint strong {
  color: var(--th-text-muted, #8fa4c2);
  font-weight: 600;
}

.module-cost-hint--muted {
  opacity: 0.9;
}

.credit-cost-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 12px;
  color: var(--th-text-muted, #8fa4c2);
  text-align: center;
}

.credit-cost-hint strong {
  color: var(--th-accent-2, #38bdf8);
  font-weight: 600;
}

.credit-cost-hint__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--th-accent-2, #38bdf8);
  cursor: pointer;
  transition: background 0.15s;
  vertical-align: middle;
}

.credit-cost-hint__info:hover {
  background: rgba(56, 189, 248, 0.2);
}

.credit-cost-hint__info svg {
  width: 15px;
  height: 15px;
}

/**
 * Bloque unificado: botón principal + franja de costo (misma jerarquía visual
 * que rúbricas / actividad rápida). Evita que el costo quede sin soporte en
 * planeación y permite fijar botón + costo juntos en materiales (móvil).
 */
.credit-cta-shell {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid var(--th-border-soft, rgba(148, 163, 184, 0.18));
  background: rgba(8, 22, 46, 0.68);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.credit-cta-shell .credit-cost-hint {
  margin-top: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(3, 8, 18, 0.42);
}

.credit-cta-shell .btn-generar,
.credit-cta-shell .btn-gen {
  margin: 0;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}

.credit-cta-shell--planeacion .btn-generar {
  border-radius: 14px 14px 0 0;
}

.credit-cta-shell--materiales .btn-gen {
  border-radius: 14px 14px 0 0;
}

.credit-cta-shell .gen-progress {
  margin-top: 0;
  margin-bottom: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.credit-cta-shell--materiales .credit-cost-hint__info {
  background: rgba(79, 142, 247, 0.14);
  color: var(--accent, #4f8ef7);
}

.credit-cta-shell--materiales .credit-cost-hint__info:hover {
  background: rgba(79, 142, 247, 0.24);
}

/* Modal tarifas */
.enlace-tarifas-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

.enlace-tarifas-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.enlace-tarifas-panel {
  width: min(100%, 420px);
  max-height: min(88vh, 520px);
  overflow: auto;
  border-radius: var(--th-radius-lg, 16px);
  border: 1px solid var(--th-border-strong, rgba(56, 189, 248, 0.24));
  background: var(--th-bg-2, #0b1931);
  box-shadow: var(--th-shadow-md, 0 16px 34px rgba(4, 14, 31, 0.42));
  padding: 20px 22px 18px;
}

.enlace-tarifas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.enlace-tarifas-title {
  font-family: var(--th-font-head, "Space Grotesk", sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--th-text-strong, #eef5ff);
  margin: 0;
}

.enlace-tarifas-sub {
  font-size: 12px;
  color: var(--th-text-muted, #8fa4c2);
  margin: 4px 0 0;
  line-height: 1.45;
}

.enlace-tarifas-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--th-border-soft, rgba(148, 163, 184, 0.18));
  background: rgba(16, 29, 53, 0.8);
  color: var(--th-text-muted, #8fa4c2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.enlace-tarifas-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.enlace-tarifas-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.enlace-tarifas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.enlace-tarifas-table th,
.enlace-tarifas-table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.enlace-tarifas-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--th-text-dim, #6f85a5);
}

.enlace-tarifas-table td:last-child {
  font-weight: 700;
  color: var(--th-accent-2, #38bdf8);
  white-space: nowrap;
  text-align: right;
}

.enlace-tarifas-table tr:last-child td {
  border-bottom: none;
}

.enlace-tarifas-note {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--th-text-dim, #6f85a5);
}
