/* ─────────────────────────────────────────────────────────────────────────
   gwags-newsletter.css
   Gwags.NG Newsletter Subscription Component Styles

   Drop this block into styles.css (before the closing line) OR link
   it as a separate stylesheet — both work fine.
   Uses the same CSS custom properties as the rest of the site.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Footer newsletter section ─────────────────────────────────────────── */
.footer-newsletter {
  margin: 28px auto 0;
  padding: 28px 24px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(139,92,246,.10) 0%, rgba(76,29,149,.14) 100%);
  border: 1px solid rgba(139,92,246,.22);
  border-radius: 20px;
}

html.dark .footer-newsletter {
  background: linear-gradient(135deg, rgba(139,92,246,.14) 0%, rgba(76,29,149,.20) 100%);
  border-color: rgba(167,139,250,.22);
}

.footer-newsletter-heading {
  text-align: center;
  margin: 0 0 18px;
}

.footer-newsletter-heading strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 5px;
  letter-spacing: -.2px;
}

.footer-newsletter-heading p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Form layout ────────────────────────────────────────────────────────── */
.newsletter-form {
  display: grid;
  gap: 10px;
}

.newsletter-form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
}

.newsletter-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.newsletter-input::placeholder {
  color: var(--muted);
}

.newsletter-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,.13);
}

html.dark .newsletter-input {
  background: var(--surface-2);
  border-color: rgba(255,255,255,.14);
  color: var(--ink);
}

html.dark .newsletter-input:focus {
  border-color: #A78BFA;
  box-shadow: 0 0 0 3px rgba(167,139,250,.16);
}

/* Phone input shown below on full width */
.newsletter-phone-row {
  position: relative;
}

.newsletter-phone-row .newsletter-input {
  padding-left: 36px;
}

.newsletter-phone-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

/* ── Subscribe button ───────────────────────────────────────────────────── */
.newsletter-submit {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, transform .15s ease, opacity .2s;
  box-shadow: 0 6px 16px rgba(139,92,246,.28);
}

.newsletter-submit:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.newsletter-submit:active {
  transform: scale(.97);
}

.newsletter-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Loading spinner via CSS — no extra HTML needed */
.newsletter-submit[data-loading="1"]::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 8px;
  animation: nl-spin .6s linear infinite;
  vertical-align: middle;
}

@keyframes nl-spin {
  to { transform: rotate(360deg); }
}

/* ── Feedback message ───────────────────────────────────────────────────── */
.newsletter-msg {
  min-height: 0;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  border-radius: 10px;
  padding: 0;
  transition: all .2s ease;
}

.newsletter-msg:not(:empty) {
  padding: 10px 12px;
}

.newsletter-msg[data-type="success"] {
  background: #ECFDF3;
  color: #116332;
  border: 1px solid #B7DFC8;
}

.newsletter-msg[data-type="error"] {
  background: #FFF1F0;
  color: #C0392B;
  border: 1px solid #FCCAC7;
}

html.dark .newsletter-msg[data-type="success"] {
  background: rgba(16,185,129,.13);
  color: #6EE7B7;
  border-color: rgba(16,185,129,.25);
}

html.dark .newsletter-msg[data-type="error"] {
  background: rgba(239,68,68,.10);
  color: #FCA5A5;
  border-color: rgba(239,68,68,.22);
}

/* ── Privacy note ───────────────────────────────────────────────────────── */
.newsletter-privacy {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.newsletter-privacy a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 700;
}

.newsletter-privacy a:hover {
  text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .footer-newsletter {
    width: 100%;
    max-width: 100%;
    padding: 18px 14px;
    border-radius: 16px;
  }

  .newsletter-form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-submit {
    width: 100%;
    min-height: 50px;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   ADMIN PANEL — Subscribers view
   Add these styles into admin.css (or a linked stylesheet on admin.html)
   ───────────────────────────────────────────────────────────────────────── */

.nl-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.nl-stat {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nl-stat span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.nl-stat strong {
  font-size: 26px;
  font-weight: 900;
  color: var(--purple-dark);
  letter-spacing: -1px;
  line-height: 1;
}

html.dark .nl-stat strong { color: #C4B5FD; }

.nl-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.nl-source-badge.gwags_ride {
  background: #FEF3C7;
  color: #92400E;
}

html.dark .nl-source-badge { background: rgba(139,92,246,.2); color: #E9D5FF; }
html.dark .nl-source-badge.gwags_ride { background: rgba(251,191,36,.15); color: #FCD34D; }

.nl-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #D1D5DB;
}

.nl-status-dot.active { background: #22C55E; }

.nl-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nl-toggle-btn {
  border: 0;
  background: none;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background .15s;
}

.nl-toggle-btn:hover { background: var(--purple-soft); color: var(--purple-dark); }

html.dark .nl-toggle-btn:hover { background: rgba(139,92,246,.18); color: #E9D5FF; }

/* Mobile newsletter refinement */
.newsletter-contact-row{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:center}
.newsletter-submit{width:100%}
.site-footer-business-link{margin-top:24px}
@media(max-width:480px){
  .footer-newsletter{margin-top:0;width:100%;max-width:100%;}
  .footer-newsletter-heading strong{font-size:13px;line-height:1.2}
  .footer-newsletter-heading{margin-bottom:12px}
  .newsletter-contact-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  .newsletter-contact-row .newsletter-phone-row{min-width:0}
  .newsletter-contact-row .newsletter-input{min-width:0;font-size:12px;padding-left:11px;padding-right:9px}
  .newsletter-submit{width:100%;min-height:48px}
}
