/* =============================================
   HEADER — Navigation and header styles
   ============================================= */

/* ── Header Container ─────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 0.75rem 0;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 211, 201, 0.4);
}

/* ── Logo Section ─────────────────────────────────────────────────── */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-image {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  font-family: 'Noto Serif', serif;
  font-size: 1.25rem;
  color: var(--art-terracotta);
}

/* ── Dropdown Menu ────────────────────────────────────────────────── */
.dropdown-user {
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius-pill);
  background: transparent;
  padding: 0.5rem 0.5rem;
}

.dropdown-user:hover {
  background: var(--art-gold-soft);
}

.dropdown-menu-user {
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius-sm);
  box-shadow: var(--art-shadow-soft);
  min-width: 200px;
}

.dropdown-item-user {
  font-size: 0.875rem;
  color: var(--art-charcoal);
  font-family: 'Manrope', sans-serif;
  transition: background 0.2s;
}

.dropdown-item-user:hover {
  background: var(--art-gold-soft);
  color: var(--art-charcoal);
}

.dropdown-item-user.admin-link {
  color: var(--art-terracotta);
}

.dropdown-item-user.signout {
  color: var(--art-error);
}

.dropdown-item-user.signout:hover {
  background: #FEF2F2;
}

.dropdown-item-user-icon {
  width: 16px;
  color: var(--art-muted);
}

.dropdown-item-user-icon.admin-link {
  color: var(--art-terracotta);
}

.dropdown-item-user-icon.signout {
  width: 16px;
}

/* ── User Info in Dropdown ────────────────────────────────────────── */
.dropdown-header-user {
  padding: 0.75rem;
  border-bottom: 1px solid var(--art-border);
}

.dropdown-header-user__name {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--art-charcoal);
  margin-bottom: 0.25rem;
}

.dropdown-header-user__role {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  color: var(--art-muted);
  text-transform: capitalize;
}

/* ── User Avatar in Dropdown ──────────────────────────────────────── */
.avatar-dropdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--art-terracotta);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
}

.avatar-dropdown-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--art-charcoal);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-chevron {
  font-size: 0.7rem;
  color: var(--art-muted);
}

.dropdown-divider-user {
  border-color: var(--art-border);
  margin: 0.25rem 0;
}

/* ── Flash toasts ─────────────────────────────────────────────────── */

/* Stack anchored to the top-center, just below the fixed header */
.flash-toast-stack {
  position: fixed;
  top: calc(4rem + 12px);   /* header height + small breathing gap */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1090;            /* above header (1080) */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(640px, calc(100vw - 2rem));
}

.flash-toast {
  /* Override Bootstrap's default max-width: 350px so the toast fills the stack container */
  --bs-toast-max-width: 100%;
  width: 100%;
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  border: none;
  border-radius: var(--art-radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.flash-toast__header {
  padding: 0.6rem 1rem;
  border-bottom: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.flash-toast__header--error  { background: #b91c1c; color: #fff; }
.flash-toast__header--success { background: #15803d; color: #fff; }

.flash-toast__body {
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--art-dark);
  line-height: 1.5;
  word-break: break-word;   /* long emails/URLs wrap instead of overflow */
}

/* Thin countdown bar — shrinks left-to-right over the delay */
.flash-progress-bar {
  height: 3px;
  width: 100%;
  transition: width linear;   /* duration injected inline by Stimulus */
}

.flash-progress-bar--error   { background: #ef4444; }
.flash-progress-bar--success { background: #22c55e; }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  padding: 2rem 1rem;
  background: var(--art-gold-soft);
  border-top: 1px solid rgba(220, 211, 201, 0.4);
}

.footer__logo {
  width: 24px;
  height: 24px;
  filter: grayscale(1);
  opacity: 0.6;
}

.footer__section-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  color: var(--art-charcoal);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  color: var(--art-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--art-terracotta);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(220, 211, 201, 0.4);
}

.footer__copyright {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 10px;
  color: var(--art-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer__logo-mark {
  height: 40px;
  opacity: 0.1;
}

.footer__socials {
  display: flex;
  gap: 1.5rem;
}

.footer__social-icon {
  font-size: 1.125rem;
  color: var(--art-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.footer__social-icon:hover {
  color: var(--art-terracotta);
}
