/* Newsletter subscribe widget (fixed, bottom-right, above content) */
.nl {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height);
  color: var(--color-text);
}

.nl [hidden] {
  display: none !important;
}

/* Collapsed bar: Subscribe + dismiss */
.nl__bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--color-text);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

.nl__open {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nl__open:hover {
  color: var(--color-primary);
}

.nl__dismiss {
  appearance: none;
  border: none;
  border-left: 1px solid #e6e6e6;
  background: transparent;
  color: var(--color-text-light);
  font-size: 18px;
  line-height: 1;
  padding: 0 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nl__dismiss:hover {
  color: var(--color-text);
}

/* Expanded form panel */
.nl__panel {
  position: relative;
  width: 280px;
  background: #fff;
  border: 1px solid var(--color-text);
  border-radius: 12px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.16);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nl__close {
  position: absolute;
  top: 8px;
  right: 10px;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nl__close:hover {
  color: var(--color-text);
}

.nl__title {
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.nl__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nl__label {
  font-size: 13px;
  color: var(--color-text-light);
}

.nl__label em {
  font-style: normal;
}

.nl__input {
  font: inherit;
  color: var(--color-text);
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #fff;
}

.nl__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.nl__submit {
  appearance: none;
  border: none;
  background: var(--color-text);
  color: #fff;
  font: inherit;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nl__submit:hover {
  background: var(--color-primary);
}

.nl__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.nl__msg {
  margin: 0;
  font-size: 13px;
  min-height: 1em;
}

.nl__msg--error {
  color: #c0392b;
}

.nl__msg--ok {
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .nl {
    right: 12px;
    bottom: 12px;
  }

  .nl__panel {
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}
