/* public/themes/modern-white/assets/css/pages/enterprise_requests_show.css
   Detalle de solicitud empresarial — Studium 360
   Reutiliza: cp-org-details__row, badge-status--*, cp-ent-*, cp-sr-only.
   Solo define lo que es nuevo y específico de esta vista.
   ============================================================ */

/* ============================================================
   Breadcrumb (reutilizado del sistema cp-ent)
   ============================================================ */

.cp-ent-subhead__crumb{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
}

.cp-ent-subhead__crumb a{
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.cp-ent-subhead__crumb a:hover{
  color: var(--primary);
  text-decoration: underline;
}

.cp-ent-subhead__crumb span[aria-hidden]{
  color: var(--border);
}

.cp-ent-subhead__crumb span:last-child{
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   Callout de solicitud enviada con éxito
   ============================================================ */

.cp-ent-show-created{
  margin-bottom: var(--space-5);
}

.cp-ent-show-created__head{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.cp-ent-show-created__head svg,
.cp-ent-show-created__icon{
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--tone-success-text);
}

.cp-ent-show-created__head h2{
  margin: 0;
  font-size: var(--text-lg);
}

.cp-ent-show-created__meta{
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--tone-success-bg);
  border: 1px solid var(--tone-success-border);
}

.cp-ent-show-created__meta .cp-kicker{
  display: block;
  margin-bottom: 2px;
}

.cp-ent-show-created__actions{
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

/* ============================================================
   Header de la vista de detalle
   ============================================================ */

.cp-ent-show-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  position: relative;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-5);

  /* Reset explícito — anula herencia del layout */
  border: none;
  background: transparent;
}

.cp-ent-show-header::after{
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 2px;
  border-radius: 999px;
  background: var(--border);
}

.cp-ent-show-header__top{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.cp-ent-show-header__id{
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.cp-ent-page-title{
  margin: 0 0 6px;
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

.cp-ent-show-header__main{
  min-width: 0;
  flex: 1 1 auto;
}

.cp-ent-show-header__actions{
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: flex-start;
}

/* ============================================================
   Layout principal: contenido + aside
   ============================================================ */

.cp-ent-show-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-4);
  align-items: start;
}

.cp-ent-show-main{
  display: grid;
  gap: var(--space-4);
}

/* ---- Kicker con ícono en cards ---- */

.cp-ent-show-card-kicker{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   Bloques de texto dentro de las tarjetas
   ============================================================ */

.cp-ent-show-block{
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.cp-ent-show-block:first-of-type{
  margin-top: var(--space-4);
}

.cp-ent-show-block__label{
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cp-ent-show-block__value{
  margin: 0;
  color: var(--text);
  font-size: var(--text-base, 1rem);
  font-weight: 500;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---- Layout de dos columnas label/valor (autocontenido) ---- */

.cp-org-details{
  display: grid;
  gap: 0;
  margin-top: var(--space-3);
}

.cp-org-details__row{
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.cp-org-details__row:last-child{
  border-bottom: none;
}

.cp-org-details__label{
  flex: 0 0 120px;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.cp-org-details__value{
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Label estrecho — para el aside de resumen (labels cortos, valores con espacio) */
.cp-org-details--narrow-label .cp-org-details__label{
  flex: 0 0 90px;
}

/* Label ancho — para el diagnóstico (labels largos como "Subáreas o conceptos conocidos") */
.cp-org-details--wide-label .cp-org-details__label{
  flex: 0 0 200px;
}

/* ============================================================
   Aside: resumen + pasos siguientes
   ============================================================ */

.cp-ent-show-aside{
  position: sticky;
  top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cp-ent-show-summary .cp-kicker{
  margin-bottom: var(--space-2);
}

/* ---- Pasos siguientes con estado visual ---- */

.cp-ent-show-next{
  border-color: var(--tone-info-border);
  background: var(--tone-info-bg);
}

.cp-ent-show-next .cp-kicker{
  margin-bottom: var(--space-3);
  color: var(--tone-info-text);
}

.cp-ent-show-next__list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: steps;
}

.cp-ent-show-next__list li{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--muted);
  counter-increment: steps;
}

.cp-ent-show-next__list li::before{
  content: counter(steps);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  background: var(--border);
  color: var(--muted);
  line-height: 1;
}

.cp-ent-show-next__list li.is-done{
  color: var(--tone-success-text);
}

.cp-ent-show-next__list li.is-done::before{
  background: var(--tone-success-bg);
  color: var(--tone-success-text);
  border: 1px solid var(--tone-success-border);
  content: '✓';
}

.cp-ent-show-next__list li.is-active{
  color: var(--text);
  font-weight: 700;
}

.cp-ent-show-next__list li.is-active::before{
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   Utilidades
   ============================================================ */

.cp-sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 800px){
  .cp-ent-show-layout{
    grid-template-columns: 1fr;
  }

  .cp-ent-show-aside{
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cp-ent-show-summary{
    flex: 1 1 280px;
  }

  .cp-ent-show-next{
    flex: 1 1 240px;
  }
}

@media (max-width: 639px){
  .cp-ent-show-header{
    flex-direction: column;
    align-items: stretch;
  }

  .cp-ent-show-header__actions{
    width: 100%;
  }

  .cp-ent-show-header__actions .btn{
    width: 100%;
    justify-content: center;
  }

  .cp-ent-show-aside{
    flex-direction: column;
  }

  .cp-ent-show-created__meta{
    flex-direction: column;
    gap: var(--space-2);
  }
}