/* ═════════════════════════════════════════════════════════════════════════
   Lazzo Bienestar Cliente · Mis Documentos (C5.7.3)
   z-index 1200 → sobre el drawer Sesiones (hasta 1100) y bajo Sala (2000).
   Modal de envío 1250 (sobre el propio overlay).
   ═════════════════════════════════════════════════════════════════════════ */

.bcl-misdocs-overlay {
  position: fixed;
  inset: 0;
  background: #fdf6f0;
  color: #2a2236;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bclMisDocsIn 0.22s ease-out;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes bclMisDocsIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bcl-misdocs-pane {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bcl-misdocs-pane[hidden] { display: none !important; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.bcl-misdocs-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(155, 127, 212, 0.18);
  background: #fff;
  flex: 0 0 auto;
}
.bcl-misdocs-h h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bcl-misdocs-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(155, 127, 212, 0.12);
  color: #5f3aa3;
  cursor: pointer;
  transition: background 0.15s;
}
.bcl-misdocs-x:hover { background: rgba(155, 127, 212, 0.22); }
.bcl-misdocs-x i { width: 20px; height: 20px; }

/* ── Body lista ──────────────────────────────────────────────────────────── */
.bcl-misdocs-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  scroll-behavior: smooth;
}
.bcl-misdocs-intro {
  font-size: 14px;
  color: #5b4f6c;
  margin: 0 0 18px;
  line-height: 1.5;
}

.bcl-misdocs-grupo { margin-bottom: 22px; }
.bcl-misdocs-grupo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #5f3aa3;
}
.bcl-misdocs-grupo-head i { width: 16px; height: 16px; }
.bcl-misdocs-grupo-head strong { font-weight: 600; }
.bcl-misdocs-grupo-head span { color: #8a7ba0; }

/* ── Card documento ──────────────────────────────────────────────────────── */
.bcl-misdocs-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(155, 127, 212, 0.15);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(80, 60, 130, 0.04);
}
.bcl-misdocs-card-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #efe7ff 0%, #f4e9ff 100%);
  color: #5f3aa3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcl-misdocs-card-ico i { width: 22px; height: 22px; }
.bcl-misdocs-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.bcl-misdocs-card-body strong {
  font-size: 15px;
  font-weight: 600;
}

.bcl-misdocs-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(155, 127, 212, 0.12);
  color: #5f3aa3;
}
.bcl-misdocs-badge.is-pendiente-firmaA  { background: #fff4d6; color: #8a5a00; }
.bcl-misdocs-badge.is-pendiente-firmaB  { background: #ffe3c2; color: #a14b00; }
.bcl-misdocs-badge.is-firmado-completo  { background: #d6f5dd; color: #1e6b34; }
.bcl-misdocs-badge.is-enviado-a-pro     { background: #d2e8ff; color: #1d4f8b; }
.bcl-misdocs-badge.is-cancelado         { background: #f5d6d6; color: #8b1d1d; }

.bcl-misdocs-canal-meta {
  font-size: 12px;
  color: #8a7ba0;
}

/* ── Acciones de card ────────────────────────────────────────────────────── */
.bcl-misdocs-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.bcl-misdocs-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(155, 127, 212, 0.25);
  background: #fff;
  color: #5f3aa3;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.bcl-misdocs-act:hover { background: rgba(155, 127, 212, 0.06); }
.bcl-misdocs-act:active { transform: scale(0.97); }
.bcl-misdocs-act i { width: 16px; height: 16px; }
.bcl-misdocs-act.primary {
  background: linear-gradient(135deg, #9b7fd4 0%, #7a5cb9 100%);
  border-color: transparent;
  color: #fff;
}
.bcl-misdocs-act.primary:hover { filter: brightness(1.05); }

.bcl-misdocs-card-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  color: #5b4f6c;
  background: rgba(155, 127, 212, 0.06);
  border-radius: 8px;
}
.bcl-misdocs-card-hint i { flex: 0 0 auto; width: 16px; height: 16px; color: #9b7fd4; margin-top: 1px; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.bcl-misdocs-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  color: #5b4f6c;
}
.bcl-misdocs-empty i {
  width: 56px;
  height: 56px;
  color: #c9b8e8;
  margin-bottom: 16px;
}
.bcl-misdocs-empty h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.bcl-misdocs-empty p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 360px; }

/* ═════════════════════════════════════════════════════════════════════════
   Modal "Enviar al otro progenitor"  (z-index encima del overlay)
   ═════════════════════════════════════════════════════════════════════════ */
.bcl-misdocs-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 36, 0.55);
  z-index: 1250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: bclMisDocsModalIn 0.18s ease-out;
}
@keyframes bclMisDocsModalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.bcl-misdocs-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 22px 18px 28px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  animation: bclMisDocsModalUp 0.22s ease-out;
}
@keyframes bclMisDocsModalUp {
  from { transform: translateY(40px); }
  to   { transform: translateY(0); }
}
@media (min-width: 720px) {
  .bcl-misdocs-modal { align-items: center; }
  .bcl-misdocs-modal-card { border-radius: 20px; max-height: 84vh; }
}

.bcl-misdocs-modal-card h3 {
  margin: 0 0 6px;
  padding-right: 38px;
  font-size: 17px;
  font-weight: 700;
}
.bcl-misdocs-modal-card > p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #5b4f6c;
}
.bcl-misdocs-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(155, 127, 212, 0.12);
  color: #5f3aa3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcl-misdocs-modal-x i { width: 18px; height: 18px; }

.bcl-misdocs-canal-btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(155, 127, 212, 0.2);
  background: #fff;
  color: inherit;
  cursor: pointer;
  margin-bottom: 10px;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.bcl-misdocs-canal-btn:hover {
  background: rgba(155, 127, 212, 0.06);
  border-color: rgba(155, 127, 212, 0.4);
}
.bcl-misdocs-canal-btn:active { transform: scale(0.985); }
.bcl-misdocs-canal-btn.primary {
  background: linear-gradient(135deg, rgba(155, 127, 212, 0.12), rgba(122, 92, 185, 0.08));
  border-color: rgba(155, 127, 212, 0.45);
}
.bcl-misdocs-canal-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(155, 127, 212, 0.12);
  color: #5f3aa3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcl-misdocs-canal-ico i { width: 20px; height: 20px; }
.bcl-misdocs-canal-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bcl-misdocs-canal-meta strong { font-size: 15px; font-weight: 600; }
.bcl-misdocs-canal-meta span { font-size: 12.5px; color: #6b5e80; line-height: 1.4; }
.bcl-misdocs-canal-arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #9b7fd4;
}

/* Forms inline para email/whatsapp tras elegir canal */
.bcl-misdocs-canal-form {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(155, 127, 212, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bcl-misdocs-canal-form[hidden] { display: none; }
.bcl-misdocs-canal-form label {
  font-size: 13px;
  font-weight: 600;
  color: #5b4f6c;
}
.bcl-misdocs-canal-form input {
  font-size: 15px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(155, 127, 212, 0.3);
  background: #fff;
  color: inherit;
  width: 100%;
}
.bcl-misdocs-canal-form input:focus {
  outline: none;
  border-color: #9b7fd4;
  box-shadow: 0 0 0 3px rgba(155, 127, 212, 0.18);
}
.bcl-misdocs-canal-confirm {
  align-self: flex-end;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, #9b7fd4 0%, #7a5cb9 100%);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.bcl-misdocs-canal-confirm:hover { filter: brightness(1.06); }
.bcl-misdocs-canal-confirm:active { transform: scale(0.97); }

/* ═════════════════════════════════════════════════════════════════════════
   Banner "Consentimiento por firmar" en dashboard Lazzo (progenitor B)
   ═════════════════════════════════════════════════════════════════════════ */
.bcl-doc-pendiente-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 12px 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff4d6 0%, #ffe8b8 100%);
  color: #6a4500;
  box-shadow: 0 2px 8px rgba(160, 110, 0, 0.12);
}
.bcl-dpb-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: #8a5a00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcl-dpb-ico i { width: 22px; height: 22px; }
.bcl-dpb-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bcl-dpb-meta strong { font-size: 14.5px; font-weight: 700; }
.bcl-dpb-meta span { font-size: 12.5px; line-height: 1.4; }
.bcl-dpb-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #8a5a00;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.bcl-dpb-cta:hover { filter: brightness(1.08); }
.bcl-dpb-cta:active { transform: scale(0.97); }
.bcl-dpb-cta i { width: 14px; height: 14px; }
@media (max-width: 480px) {
  .bcl-doc-pendiente-banner { flex-wrap: wrap; }
  .bcl-dpb-cta { width: 100%; justify-content: center; }
}

/* Variante envío pendiente (solicitante) — púrpura suave */
.bcl-doc-pendiente-banner.bcl-dpb-envio {
  background: linear-gradient(135deg, #efe7ff 0%, #ddd0f5 100%);
  color: #3f2a6a;
  box-shadow: 0 2px 8px rgba(95, 58, 163, 0.12);
}
.bcl-doc-pendiente-banner.bcl-dpb-envio .bcl-dpb-ico {
  background: rgba(255, 255, 255, 0.7);
  color: #5f3aa3;
}
.bcl-doc-pendiente-banner.bcl-dpb-envio .bcl-dpb-cta {
  background: #5f3aa3;
}
