/* Email before paying: a narrow card over the page, above the cart drawer. */
.sella-eg-open {
  overflow: hidden;
}

.sella-eg,
.sella-eg * {
  box-sizing: border-box;
}

.sella-eg {
  --sella-eg-accent: #746fed;
  --sella-eg-accent-dark: #5f5ae0;
  --sella-eg-ink: #171717;
  --sella-eg-muted: #7b7f8a;
  --sella-eg-field-bg: #f7f7f9;
  --sella-eg-field-border: #e7e7ee;
  --sella-eg-error: #d7263d;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: inherit;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.sella-eg[hidden] {
  display: none !important;
}

.sella-eg.is-open {
  visibility: visible;
  transition-delay: 0s;
}

.sella-eg__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.28);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sella-eg.is-open .sella-eg__backdrop {
  opacity: 1;
}

.sella-eg__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sella-eg.is-open .sella-eg__panel {
  opacity: 1;
  transform: none;
}

.sella-eg__close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #b5b5b5;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sella-eg__close:hover,
.sella-eg__close:focus {
  color: #333;
  background: #f3f3f3;
}

.sella-eg__card {
  padding: clamp(22px, 5vw, 30px);
  color: var(--sella-eg-ink);
  transition: opacity 0.25s ease;
}

.sella-eg__card.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.sella-eg__title {
  margin: 0 0 6px;
  padding-inline-end: 36px;
  color: var(--sella-eg-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.sella-eg__lead {
  margin: 0 0 20px;
  color: var(--sella-eg-muted);
  font-size: 14px;
  line-height: 1.5;
}

.sella-eg__form {
  display: grid;
  gap: 10px;
}

.sella-eg__label {
  color: var(--sella-eg-muted);
  font-size: 13px;
  font-weight: 400;
}

.sella-eg .sella-eg__input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--sella-eg-field-border);
  border-radius: 10px;
  color: var(--sella-eg-ink);
  background: #fff;
  box-shadow: none !important;
  font: inherit;
  font-size: 16px;
  text-align: left;
  transition: border-color 0.2s ease;
}

.sella-eg .sella-eg__input:focus {
  border-color: var(--sella-eg-accent);
  box-shadow: none !important;
  outline: none;
}

.sella-eg__submit {
  min-height: 46px;
  margin-top: 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--sella-eg-accent);
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sella-eg__submit:hover,
.sella-eg__submit:focus {
  color: #fff;
  background: var(--sella-eg-accent-dark);
}

/* Going on without an address: small, under the main button. */
.sella-eg__guest {
  justify-self: center;
  padding: 2px 8px;
  border: 0;
  color: var(--sella-eg-muted);
  background: none;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sella-eg__guest:hover,
.sella-eg__guest:focus {
  color: var(--sella-eg-ink);
  background: none;
}

.sella-eg__submit:disabled,
.sella-eg__guest:disabled {
  cursor: default;
}

.sella-eg__message {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: var(--sella-eg-muted);
  font-size: 13px;
  line-height: 1.5;
}

.sella-eg__message.is-error {
  color: var(--sella-eg-error);
}

@media (prefers-reduced-motion: reduce) {
  .sella-eg__panel,
  .sella-eg__backdrop {
    transition: none;
  }
}
