/* ════════════════════════════════════════════════════════════
   SAADA NEWSLETTER BOX  (Hespress-style, on-brand)
   Renders above the comment form on single posts. Tokens fall back
   to literal values so the box also works outside .sfd-single.
   RTL/LTR is driven by the dir="" attribute on .sfd-nl.
════════════════════════════════════════════════════════════ */
.sfd-nl {
  --nl-navy:   var(--navy, #1a2a4a);
  --nl-navy-2: #243456;
  --nl-orange: var(--orange, #e8841a);
  --nl-orange-d: #cf7212;

  margin: 64px 0 40px;
  background: linear-gradient(135deg, var(--nl-navy) 0%, var(--nl-navy-2) 100%);
  border-radius: 16px;
  padding: 26px 30px;
  box-shadow: 0 14px 30px -18px rgba(20, 99, 107, .5);
}
.sfd-nl *,
.sfd-nl *::before,
.sfd-nl *::after { box-sizing: border-box; }

.sfd-nl-inner { display: block; }

.sfd-nl-text {
  margin: 0 0 18px;
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  font-weight: 700;
  line-height: 1.5;
}

/* Reset host form-control styling so plugins can't leak in */
.sfd-nl input,
.sfd-nl button {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.sfd-nl-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.sfd-nl-input {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 14px 22px;
  color: #1c3040;
  font-size: .95rem;
  line-height: 1.2;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sfd-nl-input::placeholder { color: #8aa3ad; opacity: 1; }
.sfd-nl-input:focus { border-color: var(--nl-orange); box-shadow: 0 0 0 3px rgba(232, 132, 26, .25); }

.sfd-nl-btn {
  flex: 0 0 auto;
  background: var(--nl-orange);
  color: #fff;
  border: 0;
  border-radius: 100px;
  padding: 14px 34px;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.sfd-nl-btn:hover { background: var(--nl-orange-d); }
.sfd-nl-btn:active { transform: translateY(1px); }
.sfd-nl-btn[disabled] { opacity: .6; cursor: default; }

.sfd-nl-msg {
  margin: 12px 2px 0;
  min-height: 1em;
  color: #eaf3f4;
  font-size: .9rem;
  line-height: 1.5;
}
.sfd-nl-msg.is-error { color: #ffd2cc; }
.sfd-nl-msg:empty { margin-top: 0; }

/* Arabic typography */
.sfd-nl--ar .sfd-nl-text { font-family: 'Cairo', sans-serif; font-weight: 700; }
.sfd-nl--ar .sfd-nl-input,
.sfd-nl--ar .sfd-nl-btn,
.sfd-nl--ar .sfd-nl-msg { font-family: 'Cairo', sans-serif; }

/* Mobile: stack the input and button */
@media (max-width: 560px) {
  .sfd-nl { padding: 22px 20px; }
  .sfd-nl-form { flex-direction: column; }
  .sfd-nl-btn { width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   HOST-THEME HARDENING
   The active site's theme/plugins were overriding the box padding,
   box-sizing and form-control widths, which pushed the heading and
   the input/button row outside the navy box. These !important rules,
   all scoped to .sfd-nl, re-assert the layout so the content always
   stays inside the box, on any host.
════════════════════════════════════════════════════════════ */
.sfd-nl, .sfd-nl * { box-sizing: border-box !important; }

.sfd-nl {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 64px 0 40px !important;
  padding: 28px clamp(20px, 4vw, 32px) !important;
  background: linear-gradient(135deg, var(--navy, #1a2a4a) 0%, #243456 100%) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.sfd-nl .sfd-nl-inner {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sfd-nl .sfd-nl-text {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: #fff !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
.sfd-nl .sfd-nl-form {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sfd-nl .sfd-nl-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid transparent !important;
  border-radius: 100px !important;
  padding: 14px 22px !important;
  color: #1c3040 !important;
  line-height: 1.2 !important;
}
.sfd-nl .sfd-nl-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  background: var(--orange, #e8841a) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 100px !important;
  padding: 14px 34px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}
.sfd-nl .sfd-nl-msg {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 2px 0 !important;
  padding: 0 !important;
}

/* Mobile: stack the field and button full-width */
@media (max-width: 560px) {
  .sfd-nl .sfd-nl-form { flex-direction: column !important; }
  .sfd-nl .sfd-nl-input,
  .sfd-nl .sfd-nl-btn { width: 100% !important; }
}
