/* Approvals, its Inbox button, Clear all, Approval History and the pass code. */

/* Inbox entry point, top left of the Inbox sheet: a plain button (Scott,
   2026-10-18), the mailbox logo and "Review N first-time senders", as tall as
   New email across from it. It wiggles once on page load, with the reference's
   Screener button's keyframes (0.4s: ±3°, twice). */
.review-button {
  --review-honey: #f2b84b;

  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 37.19px;
  padding: 0 12px 0 4.2px;
  border: 1.5px solid var(--color-rule);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 15.4px;
  text-decoration: none;
  white-space: nowrap;
  animation: review-wiggle .4s ease 1;
  transition: border-color .2s, box-shadow .3s;
}
.review-button:hover, .review-button:focus-visible { outline: none; border-color: var(--color-accent); box-shadow: 0 4px 14px rgb(48 114 221 / 0.14); }

@keyframes review-wiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(3deg); }
  40% { transform: rotate(-3deg); }
  60% { transform: rotate(3deg); }
  80% { transform: rotate(-3deg); }
  100% { transform: rotate(0deg); }
}

.review-button__logo { flex: none; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--color-accent); }
.review-button__mailbox { width: 20.3px; height: 16.1px; overflow: visible; }
.review-button__box { fill: #fff; }
.review-button__slot { stroke: var(--color-accent); }
.review-button__flag { transform-origin: 19.5px 14px; transition: transform .5s cubic-bezier(.4, 1.7, .45, 1); stroke: var(--review-honey); }
.review-button__flag-tab { fill: var(--review-honey); }
.review-button:hover .review-button__flag, .review-button:focus-visible .review-button__flag { transform: rotate(-16deg); }

.review-button__label { padding-left: 9px; color: var(--color-muted); }
.review-button__label b { color: var(--color-ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .review-button { animation: none; }
  .review-button__flag { transition-timing-function: ease; }
}

/* Approvals sheet */
.approvals { padding-bottom: 55px; }

.approvals__done {
  position: absolute;
  top: 22px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  height: 37.19px;
  padding: 5.28px 14.08px;
  border: 1px solid var(--popup-line);
  border-radius: 33px;
  background: var(--color-soft);
  color: var(--color-accent);
  font-size: 17.6px;
  line-height: 24.64px;
  font-weight: 500;
  text-decoration: none;
}

.approvals__done:hover { background: var(--popup-line); }
.approvals__done:focus-visible { outline: none; box-shadow: 0 0 0 2px #a4d2ff; }

/* HEY collapses the intro's bottom margin into the divider's, so one 24.75px gap. */
.approvals__intro { margin: 6.19px 0 0; text-align: center; }

.approvals__divider { position: relative; display: flex; height: 15.4px; margin: 24.75px 0 12.78px; line-height: 15.4px; }
.approvals__divider::before { content: ""; position: absolute; inset: 7.7px 0 auto; height: 1px; background: var(--color-rule); }

.approvals__divider-label {
  position: relative;
  display: block;
  margin: 0;
  padding-right: 7.7px;
  background: var(--color-sheet);
  font-size: 15.4px;
  line-height: 15.4px;
  font-weight: 700;
  text-transform: uppercase;
}

.approvals__clear {
  position: absolute;
  top: -0.35rem;
  right: 0;
  padding-left: 8.8px;
  background: var(--color-sheet);
  color: var(--color-accent);
  font-size: 15.4px;
  line-height: 27px;
  text-decoration: none;
}

.approvals__clear:hover { text-decoration: underline; }

.approvals__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* One waiting sender: Yes / No tiles on the left (matches HEY's clearance
   row measured at 1200px: 968 wide, 92x86 tiles, 52px avatar). */
.clearances { display: flex; flex-direction: column; }

.clearance {
  position: relative;
  display: grid;
  grid-template-columns: 202.3px minmax(0, 1fr);
  grid-template-areas: "actions content";
  align-items: start;
  padding: 5.5px 5.5px 5.5px 0;
  border-bottom: 1px solid rgb(var(--ink-rgb) / 0.15);
  border-radius: 8.8px;
  outline: none;
}

.clearance:last-child { border-bottom: none; }

.clearance__actions { grid-area: actions; display: flex; align-items: flex-start; }
.clearance__actions form { margin: 0; }
.clearance__choice { position: relative; margin: 4.4px; }

.clearance__action {
  position: relative;
  display: block;
  width: 92.35px;
  height: 86.23px;
  padding: 50.82px 10.16px 13.86px;
  border: none;
  border-radius: 8.8px;
  font: inherit;
  font-size: 15.4px;
  line-height: 21.56px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.clearance__action--in { background: rgb(48 114 221 / 0.05); color: #3072dd; }
.clearance__action--out { background: rgb(48 114 221 / 0.05); color: #3072dd; }
.clearance__action--in:hover { background: rgb(48 114 221 / 0.12); }
.clearance__action--out:hover { background: rgb(48 114 221 / 0.12); }
.clearance__action:focus-visible { outline: none; box-shadow: 0 0 0 2px #a4d2ff; }
.clearance__action-icon { position: absolute; top: 21.5px; left: 50%; width: 26px; height: 26px; translate: -50% 0; }

.clearance__content {
  grid-area: content;
  display: flex;
  align-items: flex-start;
  min-width: 0;
  padding: 12.6px 0 0 9.3px;
  color: inherit;
  text-decoration: none;
}

.clearance__arrow { flex: none; width: 10.9px; height: 10.9px; margin: 24.2px 4.5px 0 0; }
.clearance__content .avatar { --avatar-size: 52px; flex: none; margin: 4.4px 11px 0 0; font-size: 18px; }
.clearance__text { display: flex; flex-direction: column; min-width: 0; }
.clearance__from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 22.88px; }
.clearance__name { font-size: 19.8px; line-height: 19.8px; font-weight: 700; }
.clearance__email { color: var(--color-muted); font-size: 17.6px; line-height: 22.88px; }

.clearance__summary {
  display: -webkit-box;
  margin-top: 1px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 17.6px;
  line-height: 22.88px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clearance__subject { color: var(--color-ink); }
.clearance__content:hover .clearance__subject { text-decoration: underline; }

/* The small round arrow on Yes: approve to a chosen box, or mark as spam */
.clearance__more { position: absolute; top: 0; right: 0; z-index: 2; }
.clearance__more summary { list-style: none; }
.clearance__more summary::-webkit-details-marker { display: none; }

.clearance__more-button {
  display: grid;
  place-items: center;
  width: 27.5px;
  height: 27.5px;
  border-radius: 52.8px;
  color: #3072dd;
  cursor: pointer;
}

.clearance__more-button:hover, .clearance__more[open] .clearance__more-button { background: rgb(48 114 221 / 0.1); }
.clearance__more-icon { width: 16px; height: 16px; }
.clearance__more .popup-menu { top: calc(100% + 6px); left: -6px; right: auto; }
.clearance__more form { margin: 0; }

/* Approve and deliver to…: the reference's three tiles (110.4x86.2, 8.8px apart,
   in a 396px popup), in our white popup with our icons */
.clearance__more .popup-menu.clearance__menu { width: 396px; padding-bottom: 12px; }
.clearance__tiles { grid-template-columns: repeat(3, 1fr); gap: 8.8px; margin: 9.4px 3.35px 8px; }
.clearance__tiles form { display: contents; }
.clearance__tile { width: 100%; border: 1px solid var(--popup-line); font: inherit; color: var(--popup-ink); cursor: pointer; }
.clearance__tile:focus-visible { outline: none; box-shadow: 0 0 0 2px #a4d2ff; }
/* Icons drawn as the reference's (Inbox 25, The Feed 23.4, Paper Trail 25.1px),
   centred 34.5px down the tile; the margins keep the label where it was */
.clearance__tile-icon--inbox { width: 35px; height: 35px; margin: -2.8px 0 -8.2px; }
.clearance__tile-icon--feed { width: 31.2px; height: 31.2px; margin: -0.9px 0 -6.3px; }
.clearance__tile-icon--paper_trail { width: 33.5px; height: 33.5px; margin: -2.05px 0 -7.45px; }

.clearance__menu-row {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.clearance__menu-row:hover, .clearance__menu-row:focus-visible { outline: none; background: rgb(var(--shade-rgb) / 0.12); }
.clearance__menu-row kbd { margin-left: auto; font: 700 13px/13px SFMono-Regular, Consolas, Menlo, monospace; opacity: 0.6; }

@media (max-width: 40em) {
  .clearance { grid-template-columns: 1fr; grid-template-areas: "content" "actions"; }
  .clearance__content { padding: 8px 0 4px; }
}

/* Pass code: the key at the top right of Approvals */
.pass-code { position: absolute; top: 22px; right: 22px; z-index: 3; }
.pass-code summary { list-style: none; }
.pass-code summary::-webkit-details-marker { display: none; }

.pass-code__button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--popup-line);
  border-radius: 50%;
  background: var(--color-soft);
  color: var(--color-accent);
  cursor: pointer;
}

.pass-code__button:hover, .pass-code[open] .pass-code__button { background: var(--popup-line); }
.pass-code__button:focus-visible { outline: none; box-shadow: 0 0 0 2px #a4d2ff; }
.pass-code__button-icon { width: 20.6px; height: 20.6px; }

.pass-code__panel {
  /* As HEY's: over the key button, top-aligned with it */
  position: absolute;
  top: 0;
  right: -17.6px;
  width: 330px;
  padding: 22px;
  border-radius: 26.4px;
  border: 1px solid var(--popup-line);
  background: var(--popup-surface);
  box-shadow: var(--popup-shadow);
  color: var(--popup-ink);
  font-size: 15.4px;
  line-height: 21.56px;
}

.pass-code__title { margin: 0 0 13.7px; font-size: 22px; line-height: 22px; font-weight: 700; }
.pass-code__field { display: flex; height: 44.2px; padding: 1px; border: 1px solid var(--popup-line); border-radius: 26.4px; background: var(--popup-tile); }

.pass-code__input {
  flex: 1;
  min-width: 0;
  padding: 8.8px 17.6px;
  border: none;
  border-radius: 26.4px 0 0 26.4px;
  background: var(--color-sheet);
  color: var(--color-ink);
  font: 400 17.6px/24.64px var(--font);
}

.pass-code__copy {
  width: 76.3px;
  border: none;
  border-radius: 0 26.4px 26.4px 0;
  background: rgb(var(--warm-rgb) / 0.4);
  color: var(--color-ink);
  font: 400 17.6px/24.64px var(--font);
  cursor: pointer;
}

.pass-code__copy:hover { background: rgb(var(--warm-rgb) / 0.55); }
.pass-code__input:focus-visible, .pass-code__copy:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #a4d2ff; }
.pass-code__help { margin: 9.625px 0 15.4px; }
.pass-code__panel form { margin: 0; }

.pass-code__regenerate {
  width: 100%;
  height: 37.2px;
  border: none;
  border-radius: 33px;
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-size: 17.6px;
  font-weight: 500;
  cursor: pointer;
}

/* Pages one step away from Approvals: an outlined pill above a sheet */
.approvals-page { display: flex; flex-direction: column; align-items: center; }

.approvals-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 37px;
  margin-bottom: 17.6px;
  padding: 5.28px 14.08px 5.28px 33px;
  border: 1px solid var(--popup-line);
  border-radius: 33px;
  background: var(--color-soft);
  color: var(--color-accent);
  font-size: 17.6px;
  line-height: 24.64px;
  font-weight: 500;
  text-decoration: none;
}

.approvals-pill:hover { background: var(--popup-line); }
.approvals-pill__icon { position: absolute; left: 11px; width: 16px; height: 16px; }

/* Clear all unscreened */
.sheet.sheet--narrow { width: min(704px, 100%); min-height: 0; padding-bottom: 55px; border-radius: 29.7px; }
.clearing { text-align: center; }
.clearing .sheet__title { margin-bottom: 22px; text-wrap: balance; }
.clearing p { margin: 0 0 19.8px; }
.clearing form { margin: 13px 0 0; }

.clearing__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 5.28px 17.6px 5.28px 43.56px;
  border: 1px solid rgb(201 36 0);
  border-radius: 33px;
  background: transparent;
  color: rgb(201 36 0);
  font: inherit;
  font-size: 19.8px;
  font-weight: 500;
  cursor: pointer;
}

.clearing__button:hover { background: rgb(201 36 0 / 0.06); }
.clearing__button-icon { position: absolute; left: 15px; width: 22px; height: 22px; }

/* Approval History */
.approval-history { width: min(1078px, 100%); padding-bottom: 55px; }
.approval-history__subtitle { margin: 6.875px 0 28.5px; font-size: 22px; line-height: 30.8px; text-align: center; }
.approval-history__subtitle a { color: #3072dd; }

.approval-history__key { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; align-items: center; padding: 0 22px; }

.approval-history__key-pill {
  margin: 12.78px 0;
  padding: 7.7px;
  border-radius: 33px;
  font-size: 15.4px;
  line-height: 15.4px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.approval-history__key-pill--in { justify-self: end; background: linear-gradient(135deg, rgb(41 152 80 / 0.15), rgb(41 152 80 / 0.25)); }
.approval-history__key-pill--out { justify-self: start; background: linear-gradient(135deg, rgb(var(--warm-rgb) / 0.4), rgb(var(--warm-rgb) / 0.15)); }

/* A dashed line down the middle, with approvals on the left and denials on the right */
.approval-history__timeline {
  display: flex;
  flex-direction: column;
  padding-bottom: 22px;
  background: repeating-linear-gradient(to bottom, rgb(var(--ink-rgb) / 0.2) 0 6px, transparent 6px 12px) center top / 1px 100% no-repeat;
}

.approval-history__empty { margin: 49.5px auto 0; padding: 0 11px; background: var(--color-sheet); color: var(--color-muted); text-align: center; }
.approval-history__day { display: flex; flex-direction: column; }

.approval-history__date {
  align-self: center;
  margin: 49.5px 0 19.8px;
  padding: 19.8px 39.6px 4.95px;
  border-bottom: 1px solid rgb(var(--ink-rgb) / 0.15);
  background: var(--color-sheet);
  font-size: 19.8px;
  line-height: 19.8px;
  font-weight: 700;
}

.history-entry {
  display: grid;
  grid-template-columns: 44.5px minmax(0, 1fr) 59.4px;
  align-items: center;
  column-gap: 5px;
  width: 48%;
  margin-bottom: 6.19px;
  padding: 9.9px;
  border-radius: 33px;
}

.history-entry--in { align-self: flex-start; background: linear-gradient(135deg, rgb(41 152 80 / 0.15), rgb(41 152 80 / 0.25)); }
.history-entry--out { align-self: flex-end; background: linear-gradient(135deg, rgb(var(--warm-rgb) / 0.4), rgb(var(--warm-rgb) / 0.15)); }
.history-entry .avatar { --avatar-size: 44.5px; font-size: 16px; }
.history-entry__who { display: flex; flex-direction: column; min-width: 0; min-height: 47.2px; }
.history-entry__name { overflow: hidden; font-size: 22px; line-height: 22px; margin-top: 1.1px; text-overflow: ellipsis; white-space: nowrap; }
.history-entry__email { overflow: hidden; margin-top: 2px; color: var(--color-muted); font-size: 17.6px; line-height: 20.5px; text-overflow: ellipsis; white-space: nowrap; }
.history-entry__form { justify-self: start; margin: 0; }

/* The switch is a checkbox drawn as a track and knob */
.history-entry__switch { position: relative; display: block; width: 55px; height: 33px; cursor: pointer; }
.history-entry__checkbox { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

.history-entry__track {
  position: absolute;
  inset: 0;
  border-radius: 33px;
  background: rgb(var(--ink-rgb) / 0.25);
  transition: background 0.2s;
}

.history-entry__track::after {
  content: "";
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-sheet);
  box-shadow: 0 1px 3px rgb(var(--shade-rgb) / 0.2);
  transition: translate 0.2s;
}

.history-entry__checkbox:checked + .history-entry__track { background: rgb(41 152 80); }
.history-entry__checkbox:checked + .history-entry__track::after { translate: 24.2px 0; }
.history-entry__checkbox:focus-visible + .history-entry__track { box-shadow: 0 0 0 2px #a4d2ff; }

@media (max-width: 640px) {
  .review-button { top: 16px; left: 16px; }
  .approvals__done { top: 16px; left: 16px; }
  .pass-code { top: 16px; right: 16px; }
  .pass-code__panel { width: min(330px, calc(100vw - 32px)); }
  .clearance__content .avatar { margin-left: 0; }
  .approvals__clear { position: static; display: block; padding: 8px 0 0; text-align: right; }
  .approvals-page { padding-inline: 16px; }
  .sheet.sheet--narrow { padding: 33px 16px; }
  .history-entry { width: 100%; }
  .approval-history__timeline { background: none; }
  .approval-history__key-pill { margin: 0 4px; }
}
