/**
 * TankLogic Newsletter Popup Styles
 *
 * Themeable via CSS custom properties — each site plugin injects its brand colors.
 * Defaults to the FuelCare dark navy palette if no custom properties are set.
 *
 * @version 1.0.0
 */

/* ── Backdrop ── */
.tl-nlp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--tl-nlp-backdrop, rgba(14, 23, 45, 0.97));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tl-nlp-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal ── */
.tl-nlp-modal {
  position: fixed;
  z-index: 99999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 420px;
  max-width: calc(100vw - 32px);
  background: var(--tl-nlp-bg, #0E172D);
  border-radius: 16px;
  padding: 40px 32px 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.tl-nlp-modal--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Close button ── */
.tl-nlp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--tl-nlp-muted, #94A3B8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.tl-nlp-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ── Heading ── */
.tl-nlp-heading {
  margin: 0 0 8px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--tl-nlp-heading, #fff);
  line-height: 1.25;
  text-align: center;
}

/* ── Subheading ── */
.tl-nlp-subheading {
  margin: 0 0 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--tl-nlp-subtext, #94A3B8);
  line-height: 1.5;
  text-align: center;
}

/* ── Form ── */
.tl-nlp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Inputs ── */
.tl-nlp-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--tl-nlp-input-bg, #1A2744);
  border: 1px solid var(--tl-nlp-input-border, #334155);
  border-radius: 8px;
  color: var(--tl-nlp-input-text, #fff);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.tl-nlp-input::placeholder {
  color: var(--tl-nlp-placeholder, #64748B);
}

.tl-nlp-input:focus {
  border-color: var(--tl-nlp-accent, #D97706);
  box-shadow: 0 0 0 3px var(--tl-nlp-accent-glow, rgba(217, 119, 6, 0.15));
}

/* ── Honeypot ── */
.tl-nlp-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── CTA Button ── */
.tl-nlp-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--tl-nlp-accent, #D97706);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 4px;
}

.tl-nlp-submit:hover {
  filter: brightness(0.9);
}

.tl-nlp-submit:active {
  transform: scale(0.98);
}

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

/* ── Privacy note ── */
.tl-nlp-privacy {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--tl-nlp-placeholder, #64748B);
  text-align: center;
  line-height: 1.4;
}

/* ── Error message ── */
.tl-nlp-error {
  color: #EF4444;
  font-size: 13px;
  text-align: center;
  margin: 0;
  display: none;
}

.tl-nlp-error--visible {
  display: block;
}

/* ── Success state ── */
.tl-nlp-success {
  text-align: center;
  padding: 16px 0;
}

.tl-nlp-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--tl-nlp-accent-glow, rgba(217, 119, 6, 0.15));
  border-radius: 50%;
  margin-bottom: 16px;
}

.tl-nlp-success-icon svg {
  width: 28px;
  height: 28px;
  color: var(--tl-nlp-accent, #D97706);
}

.tl-nlp-success-msg {
  font-size: 16px;
  color: var(--tl-nlp-heading, #fff);
  font-weight: 600;
  margin: 0;
}

/* ── Mobile: bottom sheet ── */
@media (max-width: 640px) {
  .tl-nlp-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 32px 20px 24px;
  }

  .tl-nlp-modal--visible {
    transform: translateY(0);
  }

  .tl-nlp-heading {
    font-size: 20px;
  }

  .tl-nlp-subheading {
    font-size: 14px;
    margin-bottom: 20px;
  }
}

/* ── Print ── */
@media print {
  .tl-nlp-backdrop,
  .tl-nlp-modal {
    display: none !important;
  }
}
