/*
 * Portal Developer — Inicio / registro de acceso (views/developer/home.php)
 * Namespace: .aw-* propios del portal developer (sidebar de guías, panel de
 * formulario, dashboard de sesión). Usa tokens del sistema aw- global.
 * layouts/layout_developer.php ya carga Bootstrap 5.3 + style.css/responsive.css.
 */

.aw-body-layout {
  padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}

/* .aw-visually-hidden se usaba en esta vista (título de landmark para
   lectores de pantalla) pero no tenía regla propia aquí -- rendía como un
   <h2>/<h1> visible normal. Patrón sr-only estándar, sin scope porque este
   CSS ya solo carga en developer/home.php. */
.aw-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- Hero de búsqueda ---------- */

.aw-hero-section {
  padding-bottom: 2.5rem;
}

.aw-hero-masthead {
  text-align: center;
}

.aw-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--aw-blue);
}

.aw-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  margin: .35rem 0 .75rem;
}

.aw-hero-subtitle {
  color: var(--aw-muted);
  max-width: 56ch;
  margin: 0 auto;
}

.aw-alerts-container {
  margin-top: 1.25rem;
}

/* ---------- Layout de dos columnas ---------- */

.aw-layout-grid,
.aw-layout {
  align-items: flex-start;
}

.aw-sidebar-card,
.aw-docs-card {
  background: var(--aw-surface);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-md, 14px);
  padding: 1.5rem;
  box-shadow: 0 6px 20px -14px rgba(10, 37, 64, .18);
}

.aw-sidebar-header {
  margin-bottom: 1rem;
}

.aw-sidebar-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}

.aw-icon-indicator {
  color: var(--aw-blue);
}

.aw-sidebar-intro {
  color: var(--aw-muted);
  font-size: .85rem;
  margin-bottom: 1rem;
}

.aw-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.aw-nav-link,
.aw-guide-link {
  display: block;
  padding: .6rem .75rem;
  border-radius: 10px;
  color: var(--aw-ink);
  text-decoration: none;
  transition: background var(--aw-transition, .18s ease), color var(--aw-transition, .18s ease);
}

.aw-nav-link:hover,
.aw-guide-link:hover {
  background: color-mix(in srgb, var(--aw-blue) 8%, transparent);
  color: var(--aw-blue);
}

.aw-nav-empty {
  color: var(--aw-muted);
  font-size: .85rem;
  padding: .5rem 0;
}

.aw-sidebar-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--aw-line);
}

.aw-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--aw-blue);
  background: color-mix(in srgb, var(--aw-blue) 10%, transparent);
  border-radius: 999px;
  padding: .3rem .75rem;
}

/* ---------- Sidebar: recursos descargables (planos/CAD) ---------- */

.aw-sidebar-card--recursos {
  margin-top: 1.5rem;
}

.aw-recursos-categoria {
  margin: 1rem 0 .4rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--aw-muted);
}

.aw-recursos-categoria:first-of-type {
  margin-top: 0;
}

.aw-recurso-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.aw-recurso-link--proximamente,
.aw-recurso-link--bloqueado {
  color: var(--aw-muted);
  cursor: default;
}

.aw-recurso-badge {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--aw-line);
  /* var(--aw-muted) daba ~4:1 de contraste sobre este fondo, por debajo
     de AA (4.5:1) para texto de este tamaño -- var(--aw-ink) cumple. */
  color: var(--aw-ink);
}

/* ---------- Panel principal / formulario ---------- */

.aw-main-panel {
  background: var(--aw-surface);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-lg, 20px);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 8px 24px -14px rgba(10, 37, 64, .18);
}

.aw-panel-header {
  margin-bottom: 1.5rem;
}

.aw-panel-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.aw-panel-desc {
  color: var(--aw-muted);
}

.aw-modern-form .aw-input-wrapper {
  margin-bottom: .35rem;
}

.aw-floating-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--aw-ink);
  margin-bottom: .4rem;
}

.aw-input {
  border: 1px solid var(--aw-line);
  border-radius: 10px;
}

.aw-input:focus {
  border-color: var(--aw-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aw-blue) 18%, transparent);
}

/* Slider de volumen de peticiones */

.aw-range-container {
  background: var(--aw-surface-2, #F4F8FA);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-md, 14px);
  padding: 1.25rem;
}

.aw-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  gap: 1rem;
}

.aw-range-label {
  font-size: .85rem;
  font-weight: 600;
  margin: 0;
}

.aw-range-value {
  font-weight: 700;
  color: var(--aw-blue);
  font-variant-numeric: tabular-nums;
}

.aw-range-slider {
  width: 100%;
  accent-color: var(--aw-blue);
}

.aw-range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--aw-muted);
  margin-top: .35rem;
}

.aw-range-help {
  font-size: .8rem;
  color: var(--aw-muted);
  margin: .75rem 0 0;
}

.aw-switch-container {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  cursor: pointer;
}

.aw-switch-slider {
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--aw-line);
  position: relative;
  transition: background var(--aw-transition, .18s ease);
}

.aw-switch-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--aw-transition, .18s ease);
}

.aw-switch-input:checked + .aw-switch-slider {
  background: var(--aw-blue);
}

.aw-switch-input:checked + .aw-switch-slider::before {
  transform: translateX(18px);
}

.aw-switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aw-switch-label {
  font-size: .85rem;
  color: var(--aw-muted);
}

.aw-link-accent {
  color: var(--aw-blue);
  font-weight: 600;
}

.aw-btn-submit {
  border-radius: 999px;
}

/* ---------- Dashboard de sesión activa ---------- */

.aw-dashboard-card {
  max-width: 480px;
  margin: 0 auto;
}

.aw-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--aw-blue) 10%, transparent);
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.aw-dashboard-title {
  font-weight: 700;
}

.aw-connection-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: color-mix(in srgb, var(--aw-success) 10%, transparent);
  border-radius: 999px;
  padding: .4rem .9rem;
}

.aw-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.aw-connection-text {
  font-size: .85rem;
}

.aw-dashboard-desc {
  max-width: 48ch;
  margin: 1rem auto 0;
}

/* ---------- Novedades / recursos ---------- */

.aw-resources-section {
  margin-top: 3rem;
}

.aw-section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.aw-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.aw-resource-card {
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius-md, 14px);
  padding: 1.25rem;
  background: var(--aw-surface);
}

.aw-card-title {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.aw-card-link {
  font-size: .85rem;
  color: var(--aw-blue);
  font-weight: 600;
}

.aw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 992px) {
  .aw-sidebar-column {
    margin-bottom: 1.5rem;
  }
}
