/* E4 (31.10.2026): account panel of the header icon (templates/_partials/header.tpl, assets/js/ggf-account-panel.js).
 * Mobile first. The header itself looks as before; only the panel is added. Layers: above the mega menu (220) inside
 * .header-sticky (250); tap targets >= 44px. */
.header-account {
  position: relative;
  display: flex;
}

/* Phone/tablet: the toggle covers the icon, so a tap opens the panel. Without JS it stays hidden (plain link). */
.header-account__toggle {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.header-account__toggle:focus-visible {
  outline: 2px solid var(--bronze, #8a6a3f);
  outline-offset: 1px;
}

/* Computer: hover opens the panel and a click on the icon opens the account page as before; the toggle is reached
 * with the keyboard (Tab after the link) and is visible only then. */
@media (hover: hover) and (pointer: fine) {
  .header-account__toggle {
    pointer-events: none;
    opacity: 0;
  }

  .header-account__toggle:focus-visible {
    pointer-events: auto;
    opacity: 1;
  }
}

.header-account__panel {
  position: fixed;
  right: 16px;
  left: 16px;
  z-index: 230;
  overflow-y: auto;
  padding: 16px;
  color: #252525;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 14%);
  text-align: left;
  overscroll-behavior: contain;
}

.header-account__panel[hidden] {
  display: none;
}

@media (min-width: 721px) {
  .header-account__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: 320px;
    max-height: none;
  }
}

/* Guest: Google / Facebook (TheCheckout), "oppure", e-mail sign-in, registration */
.header-account__social:empty {
  display: none;
}

.header-account .tc-social-panel {
  display: grid;
  gap: 10px;
  margin: 0;
}

.header-account .tc-social-panel__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  color: #3c4043;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.header-account .tc-social-panel__btn:hover {
  background: #f8faff;
  border-color: #d2e3fc;
}

.header-account .tc-social-panel__btn:focus-visible {
  outline: 2px solid var(--bronze, #8a6a3f);
  outline-offset: 2px;
}

.header-account .tc-social-panel__btn[hidden] {
  display: none;
}

.header-account .tc-social-panel__btn svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.header-account .tc-social-panel__btn.is-loading {
  cursor: progress;
  opacity: 0.7;
}

.header-account #tc-google-signin {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.header-account .tc-social-panel__status,
.header-account .tc-social-notice,
.header-account .tc-social-message {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.header-account .tc-social-panel__status--error {
  color: #b42318;
}

.header-account .tc-social-panel__status[hidden] {
  display: none;
}

.header-account .tc-social-panel__retry {
  min-height: 44px;
  padding: 8px 14px;
  color: #252525;
  background: #f4f4f4;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.header-account .tc-social-notice {
  color: #6b6b6b;
}

.header-account .tc-social-notice a {
  color: inherit;
  text-decoration: underline;
}

.header-account .tc-social-panel__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 12px;
  color: #6b6b6b;
  font-size: 12px;
}

.header-account .tc-social-panel__or::before,
.header-account .tc-social-panel__or::after {
  flex: 1 1 auto;
  height: 1px;
  background: #e3e3e3;
  content: "";
}

.header-account .tc-social-password-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
}

.header-account__login,
.header-account__to-social {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #fff;
  background: #252525;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.header-account__to-social {
  margin-bottom: 10px;
  color: #252525;
  background: #fff;
  border: 1px solid #252525;
}

.header-account__login:hover,
.header-account__login:focus-visible {
  color: #fff;
  background: #000;
}

.header-account__register {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 4px;
  color: #252525;
  font-size: 14px;
  text-decoration: underline;
}

/* Signed in: account menu */
.header-account__menu {
  display: grid;
  margin: -6px 0;
  padding: 0;
  list-style: none;
}

.header-account__menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: #252525;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.header-account__menu li:last-child a {
  border-bottom: 0;
}

.header-account__menu a:hover,
.header-account__menu a:focus-visible {
  color: var(--bronze, #8a6a3f);
}
