.store-interest {
  max-width: 38rem;
  margin-inline: auto;
}

.store-interest-field {
  display: grid;
  gap: 0.5rem;
  margin-block: 1.5rem;
}

.store-interest-field label {
  font-weight: 600;
}

.store-interest-field input,
.store-interest-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
}

.store-interest-field textarea {
  resize: vertical;
}

.store-interest-field input:focus-visible,
.store-interest-field textarea:focus-visible,
.store-interest button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.store-interest small {
  font-size: 0.85em;
}

.store-interest-errors {
  border-inline-start: 0.25rem solid currentColor;
  padding-inline: 1rem;
}

.store-interest-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.store-interest button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.store-interest-cooldown {
  --store-interest-admin-offset: 0px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  max-width: 32rem;
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid #815c2e;
  border-radius: 0.25rem;
  background: #fff9ed;
  color: #24262b;
  box-shadow: 0 0.5rem 1.5rem #24262b26;
}

.store-interest-cooldown [data-interest-cooldown-message] {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.store-interest-cooldown [data-interest-cooldown-dismiss] {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: -0.5rem -0.5rem -0.5rem 0;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.store-interest-cooldown [data-interest-cooldown-dismiss]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.store-interest-cooldown[hidden],
.store-interest-cooldown [hidden] {
  display: none;
}

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

body.admin-bar .store-interest-cooldown {
  --store-interest-admin-offset: var(--wp-admin--admin-bar--height, 32px);
}

.store-interest-cooldown.is-popup {
  position: fixed;
  z-index: 100000;
  top: calc(max(16px, env(safe-area-inset-top, 0px)) + var(--store-interest-admin-offset));
  right: max(16px, env(safe-area-inset-right, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)) - var(--store-interest-admin-offset));
  margin: 0 auto;
  overflow-y: auto;
  animation: store-interest-slide-down 220ms ease-out both;
}

/* Keep native reading-layout width rules from stretching the popup. */
body .store-interest-cooldown.is-popup {
  max-width: 32rem;
}

@keyframes store-interest-slide-down {
  from {
    transform: translateY(calc(-100% - max(16px, env(safe-area-inset-top, 0px)) - var(--store-interest-admin-offset)));
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 782px) {
  body.admin-bar .store-interest-cooldown {
    --store-interest-admin-offset: var(--wp-admin--admin-bar--height, 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-interest-cooldown.is-popup {
    animation: none;
  }
}
