/* Shared top bar: app, generator, admin (logged-in), optional slim variant for auth-only pages */

.klypp-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  flex-shrink: 0;
  padding: 14px 28px;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: "DM Sans", system-ui, sans-serif;
}

.klypp-site-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.klypp-site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.klypp-site-header__logo svg {
  display: block;
}

/* Admin entry: left rail, only for admin plan (visibility controlled by [hidden] or .is-visible) */
.klypp-site-header__admin {
  display: none;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(200, 240, 0, 0.35);
  background: rgba(200, 240, 0, 0.08);
  color: #c8f000;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.klypp-site-header__admin.is-visible {
  display: inline-flex;
}

.klypp-site-header__admin:hover {
  background: rgba(200, 240, 0, 0.14);
  border-color: rgba(200, 240, 0, 0.55);
}

.klypp-site-header__admin.klypp-site-header__pill--current {
  opacity: 0.95;
  pointer-events: none;
  cursor: default;
  background: rgba(200, 240, 0, 0.14);
  border-color: rgba(200, 240, 0, 0.55);
}

.klypp-site-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.klypp-site-header__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.klypp-site-header__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(200, 240, 0, 0.4);
  color: #c8f000;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.klypp-site-header__pill:hover {
  background: rgba(200, 240, 0, 0.1);
  border-color: rgba(200, 240, 0, 0.65);
}

.klypp-site-header__pill--current {
  cursor: default;
  pointer-events: none;
  opacity: 0.92;
  border-color: rgba(200, 240, 0, 0.35);
}

.klypp-site-header__pill--muted {
  border-color: rgba(255, 255, 255, 0.12);
  color: #c8c8cc;
}

.klypp-site-header__pill--muted:hover {
  color: #c8f000;
  border-color: rgba(200, 240, 0, 0.35);
}

.klypp-site-header__badge {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 980px;
  background: rgba(200, 240, 0, 0.12);
  color: #c8f000;
  border: 1px solid rgba(200, 240, 0, 0.28);
}

.klypp-site-header__badge.is-free {
  background: rgba(100, 100, 100, 0.12);
  color: #8e8e93;
  border-color: rgba(100, 100, 100, 0.22);
}

.klypp-site-header__badge.is-creator {
  background: rgba(50, 173, 230, 0.12);
  color: #32ade6;
  border-color: rgba(50, 173, 230, 0.28);
}

.klypp-site-header__badge.is-pro {
  background: rgba(191, 90, 242, 0.12);
  color: #bf5af2;
  border-color: rgba(191, 90, 242, 0.25);
}

.klypp-site-header__badge.is-admin {
  background: rgba(200, 240, 0, 0.18);
  color: #c8f000;
  border-color: rgba(200, 240, 0, 0.38);
}

.klypp-site-header__email {
  font-size: 12px;
  color: #8e8e93;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.klypp-site-header__logout,
.klypp-site-header__leave {
  background: none;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  font-size: 12px;
  font-family: "DM Sans", system-ui, sans-serif;
  padding: 4px 2px;
  transition: color 0.15s;
}

.klypp-site-header__logout:hover,
.klypp-site-header__leave:hover {
  color: #e5e5ea;
}

.klypp-site-header__auth {
  display: none;
  align-items: center;
  gap: 10px;
}

.klypp-site-header__auth-link {
  color: #c8c8cc;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.klypp-site-header__auth-link:hover {
  color: #e5e5ea;
}

.klypp-site-header__auth-link--primary {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(200, 240, 0, 0.4);
  color: #c8f000;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.klypp-site-header__auth-link--primary:hover {
  background: rgba(200, 240, 0, 0.1);
  border-color: rgba(200, 240, 0, 0.65);
  color: #c8f000;
}

.klypp-site-header:not(.klypp-site-header--anonymous) .klypp-site-header__auth {
  display: none !important;
}

/* Login / gate pages: hide session chrome */
.klypp-site-header--anonymous .klypp-site-header__badge,
.klypp-site-header--anonymous .klypp-site-header__email,
.klypp-site-header--anonymous .klypp-site-header__logout,
.klypp-site-header--anonymous .klypp-site-header__leave {
  display: none !important;
}

.klypp-site-header--anonymous .klypp-site-header__auth {
  display: inline-flex;
}

@media (max-width: 720px) {
  .klypp-site-header {
    padding: 12px 18px;
  }

  .klypp-site-header__right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}
