/* =========================================================
   Transacta Brokers — Newsletter Modals (Subscribe & Unsubscribe)
   Matches Marbella Gold & Deep Obsidian luxury aesthetic
========================================================= */

.tb-nl-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.tb-nl-backdrop.tb-nl--open {
  opacity: 1;
  visibility: visible;
}

.tb-nl-window {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: #0d0d0a;
  border: 1px solid rgba(201, 168, 76, 0.38);
  border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 45px rgba(201, 168, 76, 0.12);
  padding: 2.25rem 2rem 2rem;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: #f0ece0;
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tb-nl-backdrop.tb-nl--open .tb-nl-window {
  transform: scale(1) translateY(0);
}

.tb-nl-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #9a9180;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
  padding: 0;
  z-index: 2;
}

.tb-nl-close:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: #c9a84c;
  color: #c9a84c;
  transform: scale(1.05);
}

.tb-nl-close:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 2px;
}

.tb-nl-header {
  margin-bottom: 1.35rem;
  text-align: left;
  padding-right: 2rem;
}

.tb-nl-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 0.4rem;
}

.tb-nl-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #f7f4ea;
  margin: 0 0 0.5rem 0;
}

.tb-nl-subtitle {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #a8a090;
  margin: 0;
}

.tb-nl-field {
  margin-bottom: 1.15rem;
}

.tb-nl-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8c0b0;
  margin-bottom: 0.4rem;
}

.tb-nl-field input[type="text"],
.tb-nl-field input[type="email"] {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: #141410;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  color: #f7f4ea;
  font-family: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.tb-nl-field input[type="text"]:focus,
.tb-nl-field input[type="email"]:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.tb-nl-field input[aria-invalid="true"] {
  border-color: #e55353;
}

.tb-nl-error {
  display: block;
  font-size: 0.75rem;
  color: #ff6b6b;
  margin-top: 0.35rem;
  min-height: 1rem;
}

.tb-nl-checkbox-field {
  margin-bottom: 1.25rem;
}

.tb-nl-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #a8a090;
  text-transform: none;
  font-weight: 400;
}

.tb-nl-checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #c9a84c;
  width: 1rem;
  height: 1rem;
}

.tb-nl-checkbox-label a {
  color: #c9a84c;
  text-decoration: underline;
  word-break: break-all;
}

.tb-nl-checkbox-label a:hover {
  color: #e5c46b;
}

.tb-nl-submit {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #c9a84c 0%, #b8933b 100%);
  color: #0b0c0e;
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, opacity 0.16s;
  box-shadow: 0 4px 18px rgba(201, 168, 76, 0.3);
}

.tb-nl-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.42);
}

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

.tb-nl-status {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  min-height: 1.2rem;
  text-align: center;
  color: #ff6b6b;
}

/* Success View */
.tb-nl-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.tb-nl-success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(72, 187, 120, 0.15);
  border: 1px solid rgba(72, 187, 120, 0.35);
  color: #48bb78;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-nl-success h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: #f7f4ea;
  margin: 0 0 0.6rem 0;
}

.tb-nl-success p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #a8a090;
  margin: 0 0 1.5rem 0;
}

.tb-nl-btn-secondary {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  color: #f7f4ea;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.tb-nl-btn-secondary:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: #c9a84c;
  color: #c9a84c;
}

/* Footer Link / Button Styling */
.footer__subscribe-link {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-faint, #7a756b);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s ease;
}

.footer__subscribe-link:hover {
  color: var(--color-primary, #c9a84c);
}

.footer__unsubscribe-btn {
  font-family: inherit;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-faint, #7a756b);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm, 4px);
  padding: 0.18rem 0.55rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  line-height: 1.25;
}

.footer__unsubscribe-btn:hover {
  color: var(--color-text, #f0ece0);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.footer__unsubscribe-btn:focus-visible {
  outline: 2px solid var(--color-primary, #c9a84c);
  outline-offset: 2px;
}
