/* Newsletter public styles */

.oic-nl-shortcode-form,
.oic-nl-inline,
.oic-nl-message,
.oic-nl-preferences {
  font-family: Arial, Tahoma, sans-serif;
  color: #333;
}

.oic-nl-shortcode-form__title {
  margin: 0 0 16px;
  color: #164E3D;
  font-size: 20px;
}

.oic-nl-shortcode-form__form,
.oic-nl-inline__form,
.oic-nl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 70%;
}

.oic-nl-shortcode-form__form label,
.oic-nl-form label {
  font-weight: 600;
  font-size: 14px;
}
.oic-nl-req { color: #c0392b; margin-inline-start: 3px; }

/* Stack layout: fields in a responsive two-column grid, actions below. */
.oic-nl-shortcode-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}
.oic-nl-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.oic-nl-field input, .oic-nl-field select { width: 100%; box-sizing: border-box; }
.oic-nl-shortcode-form__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.oic-nl-shortcode-form__note { font-size: 12px; color: #6b7b74; }

/* Compact layout: one row, email + button, for hero cards. */
.oic-nl-shortcode-form--compact .oic-nl-shortcode-form__row {
  display: flex; gap: 8px; align-items: stretch;
  background: var(--surface-2, #FBFCFA); border: 1px solid var(--line, #E6E9E4);
  border-radius: 14px; padding: 6px;
}
.oic-nl-shortcode-form--compact .oic-nl-shortcode-form__row input[type="email"] {
  flex: 1 1 160px; min-width: 0; border: 0; background: transparent; outline: none;
  padding: .7rem 1rem; font-size: 15px; color: var(--oic-green); box-shadow: none;
}
.oic-nl-shortcode-form--compact .oic-nl-shortcode-form__row .oic-btn { border-radius: 10px; padding: .7rem 1.4rem; white-space: nowrap; }
.oic-nl-shortcode-form--compact .oic-nl-shortcode-form__feedback:empty { display: none; }
.oic-nl-shortcode-form--compact .oic-nl-shortcode-form__feedback { margin-top: 8px; }
.oic-nl-shortcode-form__feedback:empty { display: none; }

.oic-nl-shortcode-form__text { margin: 0 0 10px; font-weight: 600; color: #164E3D; }
.oic-nl-inline .oic-nl-shortcode-form__row { background: #fff; }

/* ---- Opt-in dialog ------------------------------------------------------ */
.oic-nl-modal-open { overflow: hidden; }
.oic-nl-modal {
  position: fixed; inset: 0; z-index: 1090;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6, 20, 15, .62); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease;
  font-family: inherit;
}
.oic-nl-modal.is-open { opacity: 1; }
.oic-nl-modal__box {
  position: relative; width: min(520px, 100%); max-height: 92vh; overflow-y: auto;
  background: #fff; color: #16221E; border-radius: 20px; padding: 28px 28px 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
  transform: translateY(14px) scale(.98); transition: transform .2s ease;
}
.oic-nl-modal.is-open .oic-nl-modal__box { transform: none; }
.oic-nl-modal__close {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: #F1F4F2; color: #4A574F; cursor: pointer; font-size: 15px;
}
.oic-nl-modal__close:hover { background: #E6ECE8; color: #16221E; }
.oic-nl-modal__head { text-align: center; margin-bottom: 18px; }
.oic-nl-modal__icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #E7F1EC; color: #16875A; font-size: 24px;
}
.oic-nl-modal__title { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; color: #0B3D2E; }
.oic-nl-modal__sub { margin: 0; color: #4A574F; font-size: .92rem; line-height: 1.6; }
.oic-nl-modal__email {
  display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px;
  background: #F1F4F2; color: #16221E; font-size: .84rem; font-weight: 600;
  overflow-wrap: anywhere;
}
.oic-nl-modal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oic-nl-modal__grid .oic-nl-field label { font-size: 13px; color: #4A574F; }
.oic-nl-modal__grid input, .oic-nl-modal__grid select {
  border: 1px solid #DCE3DE; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; color: #16221E;
}
.oic-nl-modal__grid input:focus, .oic-nl-modal__grid select:focus { outline: 2px solid #16875A; outline-offset: 1px; border-color: transparent; }
.oic-nl-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.oic-nl-modal__actions .oic-btn { flex: 1 1 auto; justify-content: center; border-radius: 12px; padding: 12px 18px; }
.oic-nl-modal__actions .oic-btn--primary { background: #0B3D2E; }
.oic-nl-modal__actions .oic-btn--primary:hover { background: #0F5C42; }
.oic-nl-modal__actions .oic-btn--ghost { color: #4A574F; border-color: #DCE3DE; }
.oic-nl-modal__actions .oic-btn--ghost:hover { background: #F1F4F2; color: #16221E; }
.oic-nl-modal__note { margin: 14px 0 0; font-size: 12px; color: #6b7b74; text-align: center; line-height: 1.6; }
.oic-nl-modal__error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fce8e8; color: #8a1c1c; font-size: 13px; }

.oic-nl-modal__panel--sending, .oic-nl-modal__panel--success, .oic-nl-modal__panel--error { text-align: center; padding: 12px 4px 4px; }
.oic-nl-modal__panel--sending p { margin: 12px 0 0; color: #4A574F; font-weight: 600; }
.oic-nl-modal__spinner {
  width: 44px; height: 44px; margin: 8px auto 0; border-radius: 50%;
  border: 4px solid #E7F1EC; border-top-color: #16875A; animation: oic-nl-spin .8s linear infinite;
}
@keyframes oic-nl-spin { to { transform: rotate(360deg); } }
.oic-nl-modal__check {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #E7F1EC; color: #16875A; font-size: 36px;
  animation: oic-nl-pop .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
.oic-nl-modal__check--error { background: #fce8e8; color: #c0392b; }
@keyframes oic-nl-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.oic-nl-modal__msg { margin: 0 0 8px; font-size: 1rem; color: #16221E; line-height: 1.7; }
.oic-nl-modal__hint { margin: 0 0 18px; font-size: .82rem; color: #6b7b74; }
.oic-nl-modal__panel--success .oic-btn, .oic-nl-modal__panel--error .oic-btn--primary { min-width: 140px; justify-content: center; border-radius: 12px; }
.oic-nl-modal__panel--success .oic-btn--primary { background: #0B3D2E; }
.oic-nl-modal__panel--error .oic-nl-modal__actions { justify-content: center; }
@media (max-width: 560px) {
  .oic-nl-modal { padding: 0; align-items: flex-end; }
  .oic-nl-modal__box { border-radius: 20px 20px 0 0; max-height: 94vh; padding: 24px 18px 20px; }
  .oic-nl-modal__grid { grid-template-columns: minmax(0, 1fr); }
}

/* The footer is dark green: the form must read light on it. */
.oic-footer .oic-nl-shortcode-form { color: #DCE7E1; }
.oic-footer .oic-nl-shortcode-form__form label { color: #DCE7E1; font-size: 13px; }
.oic-footer .oic-nl-shortcode-form__form input,
.oic-footer .oic-nl-shortcode-form__form select {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #fff;
  border-radius: 10px;
}
.oic-footer .oic-nl-shortcode-form__form input::placeholder { color: rgba(255,255,255,.45); }
.oic-footer .oic-nl-shortcode-form__form select option { color: #16221E; }
.oic-footer .oic-nl-shortcode-form__form input:focus,
.oic-footer .oic-nl-shortcode-form__form select:focus { outline: 2px solid #C8992E; outline-offset: 1px; border-color: transparent; }
.oic-footer .oic-nl-shortcode-form__note { color: #9DB6AC; }
.oic-footer .oic-btn--primary { background: #C8992E; color: #16221E; border-radius: 10px; }
.oic-footer .oic-btn--primary:hover { background: #E0B04A; }
.oic-footer .oic-nl-shortcode-form__feedback[data-type="success"] { background: rgba(255,255,255,.1); color: #E7F1EC; }
.oic-footer .oic-nl-shortcode-form__feedback[data-type="error"] { background: rgba(255,120,120,.16); color: #FFD9D9; }

.oic-nl-shortcode-form__form input,
.oic-nl-shortcode-form__form select,
.oic-nl-inline__form input,
.oic-nl-form input,
.oic-nl-form select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.oic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.oic-btn--primary {
  background: #0e7c6b;
  color: #fff;
}

.oic-btn--primary:hover {
  background: #0a5e50;
}

.oic-btn--accent {
  background: #c8992e;
  color: #fff;
}

.oic-btn--accent:hover {
  background: #a87f24;
}

.oic-btn--ghost {
  background: transparent;
  color: #0e7c6b;
  border: 1px solid #0e7c6b;
}

.oic-btn--ghost:hover {
  background: #0e7c6b;
  color: #fff;
}

.oic-nl-shortcode-form__feedback,
.oic-nl-inline__feedback,
.oic-nl-notice {
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
}

.oic-nl-notice--success,
.oic-nl-shortcode-form__feedback[data-type="success"],
.oic-nl-inline__feedback[data-type="success"] {
  background: #e6f4ef;
  color: #164E3D;
}

.oic-nl-notice--error,
.oic-nl-shortcode-form__feedback[data-type="error"],
.oic-nl-inline__feedback[data-type="error"] {
  background: #fce8e8;
  color: #8a1c1c;
}

.oic-nl-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 24px;
}

.oic-nl-message__box,
.oic-nl-preferences__box {
  max-width: 560px;
  width: 100%;
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.oic-nl-preferences__box h1 {
  margin: 0 0 20px;
  color: #164E3D;
  font-size: 22px;
}

.oic-nl-preferences__box hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Inline compact form */
.oic-nl-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.oic-nl-inline__text {
  margin: 0;
  font-weight: 600;
  color: #164E3D;
}

.oic-nl-inline__form {
  flex-direction: row;
  align-items: stretch;
  flex-wrap: wrap;
}

.oic-nl-inline__form input[type="email"] {
  flex: 1 1 220px;
  min-width: 220px;
}

/* Landing pages (confirm / unsubscribe) */
.oic-nl-landing {
  min-height: 60vh;
  padding: 24px 0;
}

.oic-nl-landing__box {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  padding: 40px 32px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.oic-nl-landing__box h1 {
  margin: 0 0 16px;
  color: #164E3D;
  font-size: 24px;
}

.oic-nl-landing__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 16px;
  color: #0e7c6b;
}

.oic-nl-landing__icon--error {
  color: #8a1c1c;
}

.oic-nl-landing__message {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.oic-nl-landing__email {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  direction: ltr;
}

.oic-nl-landing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.oic-btn--secondary {
  background: #164E3D;
  color: #fff;
}

.oic-btn--secondary:hover {
  background: #0f362a;
  color: #fff;
}
