/* PLAYER.ID Workspace Gateway presentation.
   Scoped to the public role selector; role-specific access views remain untouched. */
body.access-active:has(#accessRoleGateway:not(.hidden)) {
  --pid-app-width: min(1460px, calc(100% - 64px));
  --pid-app-max-width: none;
  --pid-access-main-width: 100%;
  --pid-access-main-max-width: none;
  --pid-access-main-padding: 28px 0 56px;
  --pid-access-portal-padding: 0px;
  --pid-access-app-canvas: var(--pid-color-canvas);
  --pid-access-canvas: var(--pid-color-canvas);
}

body.access-active:has(#accessRoleGateway:not(.hidden)) > .app {
  width: 100%;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

body.access-active:has(#accessRoleGateway:not(.hidden)) #accessPortal {
  width: 100%;
  max-width: none;
}

#accessRoleGateway {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: var(--pid-space-6) 0 var(--pid-space-5);
  background: var(--pid-color-canvas);
  color: var(--pid-color-text);
}

.pid-gateway-header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pid-space-5);
  min-height: 76px;
  padding: var(--pid-space-3) var(--pid-space-7);
  border: 0;
  border-bottom: 1px solid var(--pid-color-border);
  border-radius: 0;
  background: var(--pid-color-surface);
  box-shadow: none;
}

.pid-gateway-identity,
.pid-gateway-header-actions,
.pid-gateway-security {
  display: flex;
  align-items: center;
}

.pid-gateway-identity { gap: var(--pid-space-3); }
.pid-gateway-identity img { width: 52px; height: 52px; object-fit: contain; }
.pid-gateway-identity span,
.pid-gateway-footer { display: grid; }
.pid-gateway-identity strong { color: var(--pid-color-navy); font-size: 1rem; letter-spacing: .03em; }
.pid-gateway-identity small { margin-top: 2px; color: var(--pid-color-text-muted); font-size: .72rem; }
.pid-gateway-header-actions { justify-content: flex-end; gap: var(--pid-space-4); }
.pid-gateway-identity,
.pid-gateway-header-actions { min-width: 0; }
.pid-gateway-security { gap: var(--pid-space-2); color: var(--pid-color-text-muted); font-size: .72rem; font-weight: 750; }
.pid-gateway-security i { width: 7px; height: 7px; border-radius: 50%; background: var(--pid-color-teal); }
.pid-gateway-home { white-space: nowrap; }

.pid-gateway-hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px var(--pid-space-4) 32px;
  text-align: center;
}

.pid-gateway-hero h2 { margin: 7px 0 0; color: var(--pid-color-navy); font-size: clamp(2.625rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.pid-gateway-hero p { margin: var(--pid-space-3) 0 0; color: var(--pid-color-text-muted); font-size: .95rem; }
.pid-gateway-motto { display: flex; align-items: center; justify-content: center; gap: var(--pid-space-2); margin-top: var(--pid-space-3); color: var(--pid-color-teal-hover); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pid-gateway-motto b { width: 3px; height: 3px; border-radius: 50%; background: var(--pid-color-border-strong); }

.pid-gateway-grid { box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pid-space-6); width: 100%; max-width: 1240px; min-width: 0; margin-inline: auto; }
.pid-gateway-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 280px;
  padding: 28px;
  border: 1px solid var(--pid-color-border);
  border-radius: var(--pid-radius-lg);
  outline: 0;
  background: var(--pid-surface);
  color: var(--pid-color-text);
  box-shadow: var(--pid-shadow-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pid-gateway-card:hover { transform: translateY(-2px); border-color: var(--pid-color-teal); box-shadow: var(--pid-shadow-md); }
.pid-gateway-card:focus-visible { border-color: var(--pid-color-teal); box-shadow: var(--pid-focus-ring), var(--pid-shadow-sm); }
.pid-gateway-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--pid-space-3); }
.pid-gateway-icon { width: 50px; height: 50px; border-radius: var(--pid-radius-md); }
.pid-gateway-icon > svg { width: 25px; height: 25px; }
.pid-gateway-role { color: var(--pid-color-teal-hover); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.pid-gateway-card > strong { display: block; margin-top: var(--pid-space-5); color: var(--pid-color-navy); font-size: 1.5rem; line-height: 1.2; }
.pid-gateway-card > small { display: block; max-width: 520px; margin-top: 7px; color: var(--pid-color-text-muted); font-size: .9rem; line-height: 1.5; }
.pid-gateway-card ul { display: grid; gap: 8px; margin: var(--pid-space-5) 0; padding: 0; list-style: none; color: #405766; font-size: .875rem; }
.pid-gateway-card li { position: relative; padding-left: 17px; }
.pid-gateway-card li::before { content: ""; position: absolute; top: .43em; left: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--pid-color-teal); }
.pid-gateway-cta { width: 100%; margin-top: auto; pointer-events: none; }
.pid-gateway-cta span { font-size: 1rem; transition: transform .16s ease; }
.pid-gateway-card:hover .pid-gateway-cta span { transform: translateX(3px); }

.pid-gateway-footer { justify-items: center; gap: 3px; padding: var(--pid-space-6) var(--pid-space-4) 0; color: var(--pid-color-text-muted); text-align: center; }
.pid-gateway-footer strong { color: var(--pid-color-navy); font-size: .78rem; }
.pid-gateway-footer span { font-size: .68rem; }

@media (max-width: 768px) {
  body.access-active:has(#accessRoleGateway:not(.hidden)) {
    --pid-app-width: calc(100% - 32px);
    --pid-access-main-padding: 20px 0 40px;
  }
  #accessRoleGateway { width: 100%; padding-block: var(--pid-space-4); }
  .pid-gateway-header {
    align-items: flex-start;
    border: 1px solid var(--pid-color-border);
    border-radius: var(--pid-radius-md);
    box-shadow: var(--pid-shadow-sm);
  }
  .pid-gateway-header-actions { align-items: flex-end; flex-direction: column; gap: var(--pid-space-2); }
  .pid-gateway-hero { padding-block: var(--pid-space-6) var(--pid-space-5); }
  .pid-gateway-grid { gap: var(--pid-space-4); }
}

@media (max-width: 700px) {
  .pid-gateway-header { align-items: stretch; flex-direction: column; }
  .pid-gateway-header-actions { align-items: stretch; }
  .pid-gateway-security { justify-content: flex-start; }
  .pid-gateway-home { width: 100%; }
  .pid-gateway-grid { grid-template-columns: 1fr; }
  .pid-gateway-card { min-height: 0; }
}

@media (max-width: 430px) {
  .pid-gateway-header { padding: var(--pid-space-3); }
  .pid-gateway-hero { padding-inline: var(--pid-space-2); }
  .pid-gateway-hero h2 { font-size: 2rem; }
  .pid-gateway-card { padding: var(--pid-space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .pid-gateway-card,
  .pid-gateway-cta span { transition: none; }
}
