/* =============================================================================
   shell.css — Headerbar, PWA-banner en login-/auth-scherm.

   LET OP: de volgorde van de <link>-tags in index.html IS de cascade.
   Niet herschikken zonder die volgorde mee te wijzigen (zie AGENTS.md).
   ========================================================================== */
/* ── Header Bar ── */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--page-bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
  padding: 0 var(--space-lg);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.2);
  object-fit: cover;
  /* Logo overal weg in de topbalk, maar met behoud van zijn ruimte (offset),
     zodat "Tussenuur.info" niet naar links verspringt. visibility i.p.v.
     display:none houdt het vak (en de flex-gap) intact op desktop. */
  visibility: hidden;
}

/* Op mobiel wél de offset weg: daar verdwijnt het verborgen logo echt uit de
   flow (display:none), zodat "Tussenuur.info" netjes links uitlijnt in plaats
   van een lege inspringing te houden. */
@media (max-width: 640px) {
  .header-logo {
    display: none;
  }
}

.header-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header-user:hover {
  background: var(--surface-bg);
  border-color: var(--surface-border);
}

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-avatar-initials {
  background: var(--accent-gradient);
  color: var(--text-on-gradient);
  font-size: 0.6875rem;
  font-weight: 700;
}

.header-info {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PWA Banner ── */
.pwa-banner {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  left: 50%;
  z-index: 55;
  max-width: min(92vw, 440px);
  width: max-content;
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  animation: pwa-slide-up 0.3s ease-out;
}

@keyframes pwa-slide-up {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.pwa-banner-text {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Login Panel ── */
.login-panel {
  max-width: 460px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  min-height: calc(100dvh - 140px);
  display: flex;
  align-items: center;
}

.login-card {
  width: 100%;
  padding: var(--space-2xl);
}

.login-card-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--surface-border);
  object-fit: cover;
  margin-bottom: var(--space-md);
}

/* ── OAuth ── */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--input-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.oauth-btn:hover {
  background: var(--surface-hover);
  border-color: var(--input-focus-border);
}

.oauth-btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.oauth-btn-disabled:hover {
  background: var(--input-bg);
  border-color: var(--surface-border);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-border);
}

/* ── Auth Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-toggle-text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-xl);
}

