/* Horoskopbladet påmelding — scoped to .hb-signup. Colors from horoskopbladet.com forside. */
.hb-signup {
  --hb-ink: #192338;
  --hb-body: #43516a;
  --hb-muted: #67748a;
  --hb-gold: #b58a2b;
  --hb-gold-dark: #886414;
  --hb-gold-pale: #fbf5e7;
  --hb-line: #e7e9ef;
  --hb-soft: #f7f8fa;
  --hb-card: #fff;
  --hb-error: #a11b1b;
  --hb-error-bg: #fff3f2;
  --hb-error-line: #c33131;
  --hb-ok: #1d6a3f;
  --hb-ok-bg: #f0f8f3;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--hb-body);
  background: var(--hb-card);
  border: 1px solid var(--hb-line);
  border-radius: 17px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 9px 35px rgba(29, 37, 53, 0.035);
  line-height: 1.65;
  font-size: 16px;
}

.hb-signup *,
.hb-signup *::before,
.hb-signup *::after {
  box-sizing: border-box;
}

.hb-signup__title {
  margin: 0 0 10px;
  color: var(--hb-ink);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.23;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.hb-signup__lead {
  margin: 0 0 22px;
  color: var(--hb-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hb-signup__field {
  margin: 0 0 16px;
}

.hb-signup__field label {
  display: block;
  font-weight: 750;
  color: var(--hb-ink);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.hb-signup__optional {
  font-weight: 500;
  color: var(--hb-muted);
}

.hb-signup__field input[type="text"],
.hb-signup__field input[type="email"],
.hb-signup__field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cfd4de;
  border-radius: 8px;
  background: #fff;
  color: var(--hb-ink);
  font: inherit;
  font-size: 0.98rem;
  appearance: none;
  -webkit-appearance: none;
}

.hb-signup__field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2367748a' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.hb-signup__field input:focus,
.hb-signup__field select:focus,
.hb-signup__close:focus-visible {
  outline: 3px solid #896827;
  outline-offset: 2px;
  border-color: var(--hb-gold-dark);
}

.hb-signup__honeypot {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  overflow: hidden !important;
}

.hb-signup__actions {
  margin: 0 0 8px;
}

.hb-signup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 23px;
  border: 1px solid var(--hb-gold-dark);
  border-radius: 9px;
  color: #fff;
  background: var(--hb-gold-dark);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(104, 77, 27, 0.1);
  transition: background 0.16s ease, transform 0.16s ease;
}

.hb-signup__button:hover,
.hb-signup__button:focus-visible {
  background: #62480e;
  transform: translateY(-2px);
}

.hb-signup__button:focus-visible {
  outline: 3px solid #896827;
  outline-offset: 3px;
}

.hb-signup__button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.hb-signup__status {
  margin: 0;
  min-height: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hb-signup__status.is-ok {
  color: var(--hb-ok);
  background: var(--hb-ok-bg);
  border-left: 3px solid var(--hb-ok);
  padding: 12px 15px;
  margin-top: 8px;
  min-height: 1.2em;
}

.hb-signup__status.is-error {
  color: var(--hb-error);
  background: var(--hb-error-bg);
  border-left: 3px solid var(--hb-error-line);
  padding: 12px 15px;
  margin-top: 8px;
  min-height: 1.2em;
}

@media (max-width: 600px) {
  .hb-signup:not(.hb-signup--popup) {
    padding: 24px 18px;
    border-radius: 13px;
  }

  .hb-signup:not(.hb-signup--popup) .hb-signup__title {
    font-size: 1.35rem;
  }
}

/* ----- Compact slide-in (main signup) ----- */
.hb-signup--popup {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  width: 352px;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--hb-line);
  background: #fff;
  box-shadow: 0 18px 44px rgba(25, 35, 56, 0.2), 0 0 0 1px rgba(25, 35, 56, 0.04);
  font-size: 15px;
  line-height: 1.4;
}

.hb-signup--popup.is-open {
  display: block;
  animation: hb-signup-slide 0.32s ease;
}

@keyframes hb-signup-slide {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hb-signup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hb-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hb-signup__close:hover,
.hb-signup__close:focus-visible {
  color: var(--hb-ink);
  background: var(--hb-soft);
}

.hb-signup--popup .hb-signup__title {
  margin: 0 28px 4px 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.hb-signup--popup .hb-signup__lead {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.hb-signup--popup .hb-signup__row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
}

.hb-signup--popup .hb-signup__field {
  margin: 0 0 8px;
  min-width: 0;
}

.hb-signup--popup .hb-signup__field label {
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.hb-signup--popup .hb-signup__optional {
  display: none;
}

.hb-signup--popup .hb-signup__field input[type="text"],
.hb-signup--popup .hb-signup__field input[type="email"],
.hb-signup--popup .hb-signup__field select {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.88rem;
  border-radius: 8px;
}

.hb-signup--popup .hb-signup__field select {
  padding-right: 28px;
  background-position: right 10px center;
}

.hb-signup--popup .hb-signup__actions {
  margin: 0;
}

.hb-signup--popup .hb-signup__button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 8px;
}

.hb-signup--popup .hb-signup__status.is-ok,
.hb-signup--popup .hb-signup__status.is-error {
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 0.8rem;
}

/* Mobile: compact bottom sheet, not full-screen */
@media (max-width: 600px) {
  .hb-signup--popup {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    padding: 14px 14px 12px;
    border-radius: 16px;
  }

  .hb-signup--popup .hb-signup__row {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6px;
  }

  .hb-signup--popup .hb-signup__title {
    font-size: 1rem;
  }
}
