/* Customer account: header button, account menu and the sign-in dialog. */

.account-anchor { position: relative; display: inline-flex; }
.account-toggle.is-signed-in { color: #16692b; }
.account-toggle.is-signed-in::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3b9318;
}
.account-toggle { position: relative; }

.account-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: 240px;
  padding: 14px;
  border: 1px solid #dfe4dc;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(10 14 11 / .14);
}
.account-menu[hidden] { display: none; }
.account-menu p { display: grid; gap: 2px; margin: 0 0 12px; overflow-wrap: anywhere; }
.account-menu b { color: #0a0b09; font-size: .95rem; }
.account-menu span { color: #5b6257; font-size: .85rem; }
.account-menu-admin {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 2px;
  background: #16692b;
  color: #fff;
  font: 700 .8rem/1 'Cannabus Display', Arial, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.account-menu-admin[hidden] { display: none; }
.admin-panel-link[hidden] { display: none !important; }
.admin-panel-link { white-space: nowrap; }
.account-menu button {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd2c8;
  border-radius: 2px;
  background: #fff;
  color: #0a0b09;
  font: 700 .8rem/1 'Cannabus Display', Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.account-menu button:hover { border-color: #16692b; color: #16692b; }

.account-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 32px 28px 24px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #0a0b09;
  box-shadow: 0 24px 60px rgb(10 14 11 / .28);
  overflow-y: auto;
}
.account-dialog::backdrop { background: rgb(10 14 11 / .55); }
.account-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dfe4dc;
  border-radius: 2px;
  background: #fff;
  color: #0a0b09;
  cursor: pointer;
}
.account-close svg,
.account-password button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-eyebrow { margin: 0 0 6px; color: #16692b; font: 800 .75rem/1.2 'Cannabus Display', Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.account-dialog h2 { margin: 0 48px 8px 0; font: 800 1.6rem/1.1 'Cannabus Display', Arial, sans-serif; letter-spacing: -.01em; text-transform: uppercase; }
.account-subtitle { margin: 0 0 22px; color: #5b6257; font-size: .95rem; line-height: 1.45; }

.account-google[hidden] { display: none; }
.account-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border: 1px solid #cbd2c8;
  border-radius: 2px;
  color: #0a0b09;
  font-weight: 600;
  text-decoration: none;
}
.account-google-button:hover { border-color: #0a0b09; }
.account-google-button svg { width: 20px; height: 20px; }
.account-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #8a9186; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.account-divider::before,
.account-divider::after { content: ''; flex: 1; height: 1px; background: #e1e4dd; }

.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; border-bottom: 1px solid #e1e4dd; }
.account-tabs button {
  height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #6c726b;
  font: 800 .85rem/1 'Cannabus Display', Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.account-tabs button[aria-selected='true'] { border-bottom-color: #16692b; color: #0a0b09; }

.account-form label { display: block; margin-bottom: 14px; }
.account-form label[hidden] { display: none; }
.account-form label > span:first-child { display: block; margin-bottom: 7px; font: 800 .8rem/1.15 'Cannabus Display', Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.account-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd2c8;
  border-radius: 2px;
  background: #fff;
  color: #2c312c;
  font-size: 1rem;
  outline: 0;
}
.account-form input:focus { border-color: #16692b; box-shadow: inset 0 0 0 1px #16692b; }
.account-form input[aria-invalid='true'] { border-color: #b42318; box-shadow: inset 0 0 0 1px #b42318; }
.account-password { position: relative; display: block; }
.account-password input { padding-right: 52px; }
.account-password button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: #5b6257;
  cursor: pointer;
}
.account-password button[aria-pressed='true'] { color: #16692b; }
.account-form-error { min-height: 0; margin: 0 0 10px; color: #b42318; font-size: .9rem; font-weight: 600; }
.account-form-error:empty { display: none; }
.account-submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 2px;
  background: #16692b;
  color: #fff;
  font: 800 .95rem/1 'Cannabus Display', Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.account-submit:disabled { opacity: .65; cursor: progress; }
.account-legal { margin: 16px 0 0; color: #6c726b; font-size: .8rem; text-align: center; }
.account-legal a { color: inherit; }

.request-account { margin: -4px 0 6px; color: #5b6257; font-size: .9rem; overflow-wrap: anywhere; }
.request-account[hidden] { display: none; }
.request-account b { color: #0a0b09; }

/* Mid-size screens: icon only, so the main navigation keeps its room. */
@media (min-width: 781px) and (max-width: 1400px) {
  .header-actions .admin-panel-link { width: 44px; min-width: 44px; padding: 0; }
  .header-actions .admin-panel-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Phones: the header has no room, the shortcut lives in the account menu. */
@media (max-width: 780px) {
  .header-actions .admin-panel-link { display: none !important; }
}

@media (max-width: 480px) {
  .account-dialog { padding: 28px 18px 20px; }
  .account-dialog h2 { font-size: 1.35rem; }
  .account-tabs button { font-size: .78rem; letter-spacing: .04em; white-space: nowrap; }
  .account-menu { position: fixed; top: 64px; right: 16px; left: 16px; width: auto; }
}
