/* Header Component Styles */

.clip-header {
  grid-area: header;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #111827, #0f172a) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  display: flex !important;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1200px;
  width: 100%;
  padding-left: 40px !important;
  padding-right: 40px !important;
  padding-top: 10px !important;
  padding-bottom: 1px !important;
  gap: 4px;
  color: var(--text) !important;
}

.header-top-row,
.header-bottom-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.header-top-row {
  justify-content: space-between;
  gap: 20px;
}

.header-bottom-row {
  gap: 16px;
}

.header-session-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.header-brand-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}

.header-brand-logo {
  width: 52px;
  height: 52px;
  margin-top: -18px;
}

.header-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.header-logo img {
  width: 52px;
  height: 52px;
}

.header-title {
  font-size: 28px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  background: transparent;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.header-tagline {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.4px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  margin-bottom: 0;
}

.header-row:hover .header-tagline {
  opacity: 1;
}

/* Spacer utility for flex layouts */
.header-spacer {
  flex: 1;
  margin-left: auto;
}

/* Header action button area */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-auth-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-auth-controls-top {
  margin-left: auto;
  flex-shrink: 0;
}

.header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #dbe7ff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

summary.header-icon-button {
  list-style: none;
}

summary.header-icon-button::-webkit-details-marker {
  display: none;
}

.header-icon-button .material-icons {
  font-size: 21px;
}

.header-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(30, 41, 59, 0.92);
  color: #ffffff;
}

.header-icon-button-active {
  border-color: rgba(96, 165, 250, 0.7);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.22), rgba(29, 78, 216, 0.12));
  color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16), 0 10px 24px rgba(15, 23, 42, 0.22);
}

.header-account-menu-shell {
  display: flex;
  align-items: center;
}

.header-account-menu {
  position: relative;
}

.header-account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
}

.header-account-dropdown-email {
  font-size: 13px;
  line-height: 1.4;
  color: #bfdbfe;
  padding: 6px 10px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  word-break: break-word;
}

.header-account-dropdown-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.header-account-dropdown-link:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
}

/* Join section alignment */
#join-section {
  margin-left: 0 !important;
}

.header-session-stack #join-section {
  width: 100%;
}

/* Back to app link */
.header-back-link {
  text-decoration: none;
  color: #2d5aa3;
  font-weight: 600;
}

/* Session info section */
#session-info {
  margin-top: 4px;
  margin-bottom: 4px;
  margin-left: 0px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Single device hint */
.single-device-hint {
  display: none;
  font-size: 12px;
  color: var(--muted);
}

/* Captcha wrapper */
#join-captcha-wrap {
  display: none;
  padding: 4px 16px 12px 16px;
}

#join-captcha-note {
  font-size: 12px;
  color: #66727e;
  margin-bottom: 6px;
}

#join-captcha-config-note {
  display: none;
  font-size: 12px;
  color: #66727e;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .header-top-row,
  .header-bottom-row {
    flex-wrap: wrap;
  }

  .header-top-row {
    gap: 12px;
  }

  .header-brand-link {
    width: calc(100% - 56px);
  }

  .header-bottom-row {
    gap: 10px;
  }
}
