/* ============================================================
   Newsletter Popup – Travel.Sk
   Farby podľa :root v styles.css / style.css
   ============================================================ */

/* Backdrop – len keď je popup otvorený */
body.nl-popup-open .modal-backdrop {
  background-color: #000;
  opacity: 0.5;
}

body.nl-popup-open .modal-backdrop.fade {
  transition: none;
}

body.nl-popup-open .modal-backdrop.show {
  opacity: 0.5;
}

/* Dialog sizing + vertikálne centrovanie
   Globálne style-modal.css má .modal { top: 15% } pre hotelové modaly –
   newsletter popup musí mať vlastné centrovanie. */
#nl-popup-modal.modal {
  top: 0 !important;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
}

#nl-popup-modal.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  opacity: 1;
}

#nl-popup-modal.modal.show .nl-popup-dialog {
  animation: nl-popup-in 0.22s ease-out;
}

@keyframes nl-popup-in {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#nl-popup-modal .nl-popup-dialog {
  max-width: 820px;
  width: 100%;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  display: block !important;
  flex: 0 0 auto;
}

/* Modal card */
.nl-popup {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

/* ── Row ───────────────────────────────────────────────────── */
.nl-popup__row {
  min-height: 380px;
}

/* ── Image side ────────────────────────────────────────────── */
.nl-popup__image-side {
  position: relative;
  background: url('/frontend/assets/newsletter-popup-bg.png') center / cover no-repeat;
  min-height: 260px;
}

.nl-popup__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(27, 71, 43, 0.08) 0%,
    rgba(27, 71, 43, 0.2) 100%
  );
}

.nl-popup__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1;
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 100px;
  padding: 6px 12px;
  box-shadow: none;
}

/* ── Form side ─────────────────────────────────────────────── */
.nl-popup__form-side {
  background: #fff;
  display: flex;
  align-items: center;
}

.nl-popup__body {
  padding: 2rem 2rem 1.75rem;
  width: 100%;
}

.nl-popup__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bootstrap-black, #212529);
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.nl-popup__benefits {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}

.nl-popup__benefits li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.45;
}

.nl-popup__benefits li:last-child {
  margin-bottom: 0;
}

.nl-popup__benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-darker-color, #368d59);
  font-weight: 700;
  font-size: 0.82rem;
}

/* ── reCAPTCHA – skrytý kontajner, žiadne prebliknutie ───── */
.nl-popup-recaptcha {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.nl-popup-open .grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#nl-popup-form {
  position: relative;
}

/* ── Form fields (zhoda so .form-control na webe) ─────────── */
.nl-popup__field {
  margin-bottom: 0.85rem;
}

#nl-popup-form .form-control,
.nl-popup__input {
  height: 48px;
  width: 100%;
  border-radius: 15px;
  background-color: #f8f8f8;
  border: 1px solid #f8f8f8;
  font-size: 0.95rem;
  padding: 0 1rem;
  transition: 0.3s;
}

#nl-popup-form .form-control:hover,
.nl-popup__input:hover {
  border-color: #f2f2f2;
  background-color: #f2f2f2;
}

#nl-popup-form .form-control:focus,
.nl-popup__input:focus {
  border-color: var(--green-color, #60bd85);
  background-color: #f2f2f2;
  outline: none;
  box-shadow: 0 0 0 0.05rem rgba(0, 0, 0, 0.1);
}

/* ── GDPR ──────────────────────────────────────────────────── */
.nl-popup__gdpr {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.1rem;
}

.nl-popup__gdpr input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--green-darker-color, #368d59);
}

.nl-popup__gdpr label {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.4;
  cursor: pointer;
  margin-bottom: 0;
}

.nl-popup__gdpr label a {
  color: var(--green-darker-color, #368d59);
  text-decoration: underline;
}

/* ── Submit button (štýl order-btn) ────────────────────────── */
.nl-popup__submit {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background-color: var(--green-color, #60bd85);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px 20px rgba(0, 0, 0, 0.05);
}

.nl-popup__submit:hover {
  background-color: var(--green-darker-color, #368d59);
  transform: translateY(-1px);
}

.nl-popup__submit:active {
  transform: translateY(0);
}

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

/* ── Close button ──────────────────────────────────────────── */
.nl-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.nl-popup__close:hover {
  background: #fff;
  transform: scale(1.1);
}

/* ── Thank you state ───────────────────────────────────────── */
.nl-popup__thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  min-height: 280px;
}

.nl-popup__thanks[hidden],
.nl-popup__error[hidden] {
  display: none !important;
}

.nl-popup__error {
  font-size: 0.82rem;
  color: var(--discount-color, #fc7070);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.nl-popup__thanks-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--green-review-color, #5fce7b);
}

.nl-popup__thanks h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bootstrap-black, #212529);
  margin-bottom: 0.5rem;
}

.nl-popup__thanks p {
  font-size: 0.9rem;
  color: #666;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  #nl-popup-modal .nl-popup-dialog {
    max-width: calc(100% - 1rem);
  }

  #nl-popup-modal.modal.show {
    padding: 0.5rem;
  }

  .nl-popup {
    border-radius: 14px;
  }

  .nl-popup__image-side {
    min-height: 160px;
  }

  .nl-popup__badge {
    top: 0.75rem;
    left: 0.75rem;
    font-size: 10px;
    padding: 4px 10px;
  }

  .nl-popup__body {
    padding: 1.35rem 1.25rem 1.25rem;
  }

  .nl-popup__title {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
  }

  .nl-popup__benefits {
    margin-bottom: 1rem;
  }

  .nl-popup__benefits li {
    font-size: 0.84rem;
  }

  .nl-popup__close {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 400px) {
  .nl-popup__image-side {
    min-height: 140px;
  }
}
