/**
 * Portal (panel chooser) — scoped to body.idsa-global-portal only.
 * Uses shared launcher primitives from ../../shared/assets/css/shell-primitives.css
 */

/* --- Shell layout: no horizontal drift, readable measure --- */
body.idsa-global-portal {
  overflow-x: hidden;
}

.idsa-portal-shell {
  width: 100%;
  max-width: min(1180px, 100%);
  margin: 0 auto;
  min-width: 0;
}

/* --- Hero --- */
.idsa-portal-hero {
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
  padding-bottom: clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.idsa-portal-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.idsa-portal-hero__title {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.idsa-portal-env {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--idsa-text, #e8eef7);
  opacity: 0.9;
}

.idsa-portal-env:empty {
  display: none;
}

.idsa-portal-hero__lead {
  margin: 0;
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  line-height: 1.55;
  opacity: 0.86;
  max-width: 62ch;
}

/* --- Main regions --- */
.idsa-portal-main {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 5vw, 2.75rem);
  min-width: 0;
  scroll-margin-top: 1rem;
}

@media (max-width: 420px) {
  body.idsa-global-portal {
    padding-left: clamp(12px, 3.5vw, 24px);
    padding-right: clamp(12px, 3.5vw, 24px);
  }
}

/* Larger touch targets + card rhythm */
body.idsa-global-portal .idsa-launcher-card-grid {
  /* Slightly wider min column on large screens; still fluid on mobile */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(14px, 2.8vw, 20px);
}

body.idsa-global-portal .idsa-launcher-card {
  min-height: 176px;
  padding: 20px 22px;
  gap: 8px;
}

body.idsa-global-portal .idsa-launcher-card__title {
  font-size: 1.12rem;
}

body.idsa-global-portal .idsa-launcher-card__meta {
  font-size: 0.9rem;
  flex: 1 1 auto;
}

/* Role label reads as a pill */
body.idsa-global-portal .idsa-launcher-card__kicker {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.95;
  letter-spacing: 0.04em;
}

/* Visual CTA row (entire card remains the link) */
.idsa-portal-card__cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  background: color-mix(in srgb, var(--idsa-accent, #3d8bfd) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--idsa-accent, #3d8bfd) 42%, transparent);
  color: var(--idsa-text, #e8eef7);
  pointer-events: none;
}

body.idsa-global-portal .idsa-launcher-card:hover .idsa-portal-card__cta,
body.idsa-global-portal .idsa-launcher-card:focus-visible .idsa-portal-card__cta {
  background: color-mix(in srgb, var(--idsa-accent, #3d8bfd) 26%, transparent);
  border-color: color-mix(in srgb, var(--idsa-accent, #3d8bfd) 58%, transparent);
}

/* --- Footer note --- */
.idsa-portal-foot {
  margin-top: clamp(2rem, 6vw, 3rem);
  padding-top: clamp(1.25rem, 4vw, 1.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.idsa-portal-foot__note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  opacity: 0.68;
  max-width: 68ch;
}

.idsa-portal-foot__note strong {
  font-weight: 700;
  opacity: 0.92;
}
