/* =========================================
   فرم اشتراک خبرنامه و نتورکینگ
   ========================================= */

/* ---- باکس اصلی پایین صفحه ---- */
.nl-popup {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 3rem);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(60,70,30,0.18), 0 4px 8px rgba(60,70,30,0.08);
  padding: 1.25rem;
  z-index: 999;
  font-family: var(--sans);
  direction: rtl;
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

[data-theme="dark"] .nl-popup {
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.2);
}

.nl-popup.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nl-close {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  font-family: var(--sans);
}

.nl-close:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nl-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  padding-left: 1.5rem;
}

.nl-text {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.nl-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.nl-input, .nl-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  direction: rtl;
  transition: border-color 0.15s, background 0.15s;
}

.nl-input:focus, .nl-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

.nl-textarea {
  resize: none;
  min-height: 60px;
  line-height: 1.7;
}

/* honeypot — مخفی */
.nl-honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

.nl-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.15s;
}

.nl-submit:hover {
  background: var(--accent-deep, #4a5728);
}

.nl-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nl-status {
  font-size: 0.83rem;
  margin-top: 0.5rem;
  text-align: center;
  min-height: 18px;
}

.nl-status.ok { color: #5a7a3a; }
.nl-status.err { color: #a85040; }

.nl-success {
  text-align: center;
  padding: 0.5rem 0;
}

.nl-success-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.nl-success-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.nl-success-text {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.nl-tiny {
  display: block;
  font-size: 0.72rem;
  color: var(--text-mute);
  margin-top: 0.6rem;
  text-align: center;
}

/* ---- ریسپانسیو موبایل ---- */
@media (max-width: 600px) {
  .nl-popup {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    padding: 1rem;
  }
  
  .nl-row {
    grid-template-columns: 1fr;
  }
}

/* ---- لینک پایین صفحه برای کسایی که پاپ‌آپ رو بستن ---- */
.nl-footer-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--sans);
  padding: 0;
}

.nl-footer-link:hover {
  text-decoration: underline;
}
