/* ===========================
   Registration Modal
=========================== */

.reg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reg-modal.active {
  display: flex;
}

.reg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.reg-modal-box {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: modalIn 0.35s cubic-bezier(.4,0,.2,1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reg-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(0,0,0,0.07);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 3;
}

.reg-modal-close:hover {
  background: #e76f51;
  color: #fff;
}

.reg-modal-header {
  text-align: center;
  padding: 36px 32px 20px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  border-radius: 20px 20px 0 0;
}

.reg-modal-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 10px;
}

.reg-modal-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.reg-modal-header p {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}

.reg-modal-body {
  padding: 28px 28px 32px;
}

/* Force MailerLite form to look good inside modal */
.reg-modal-body .ml-embedded {
  margin: 0 !important;
}

.reg-modal-body .ml-embedded .ml-form-embedWrapper {
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* ── HARDCORE formos stiliai (savarankiška forma, be MailerLite JS) ── */
.hc-form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hc-field label:first-child {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 7px;
  line-height: 1.4;
}

.hc-field input[type="text"],
.hc-field input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  color: #333;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hc-field input[type="text"]:focus,
.hc-field input[type="email"]:focus {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
  outline: none;
}

.hc-radio-group {
  background: #f8faf7;
  border: 1.5px solid #e0ede6;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hc-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  line-height: 1.4;
  font-weight: 500;
}

.hc-radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #2d6a4f;
  cursor: pointer;
}

.hc-checkbox-field {
  background: #f8faf7;
  border: 1.5px solid #e0ede6;
  border-radius: 8px;
  padding: 12px 14px;
}

.hc-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  line-height: 1.5;
  font-weight: 500;
}

.hc-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #2d6a4f;
  cursor: pointer;
}

.hc-error-msg {
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 4px;
}

.hc-submit-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 15px 24px;
  background: #1b4332;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}

.hc-submit-btn:hover {
  background: #2d6a4f;
  transform: translateY(-1px);
}

.hc-submit-btn:disabled {
  background: #888;
  cursor: not-allowed;
  transform: none;
}

.row-success .ml-form-successContent {
  text-align: center;
  padding: 32px 16px;
}

.row-success .ml-form-successContent h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1b4332;
  margin-bottom: 10px;
}

.row-success .ml-form-successContent p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── HARDCORE modalo variantai ── */
.reg-modal-box--wide {
  max-width: 640px;
}

.reg-modal-header--hardcore {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c, #e76f51);
}

/* MailerLite formos stiliai modalo viduje */
.reg-modal-body .ml-form-embedContainer {
  width: 100% !important;
}

.reg-modal-body .ml-form-embedWrapper {
  background: transparent !important;
  width: 100% !important;
}

.reg-modal-body .ml-form-embedBody {
  padding: 0 !important;
}

.reg-modal-body .ml-form-embedContent {
  margin-bottom: 16px !important;
}

.reg-modal-body .ml-form-embedContent h4 {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--primary-dark, #1b4332) !important;
  margin-bottom: 4px !important;
}

.reg-modal-body .ml-form-embedContent p {
  color: #666 !important;
  font-size: 0.85rem !important;
}

/* Inputai */
.reg-modal-body .ml-form-fieldRow input.form-control,
.reg-modal-body .ml-form-fieldRow select.form-control {
  border-radius: 8px !important;
  border: 1.5px solid #ddd !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  transition: border-color 0.2s;
}

.reg-modal-body .ml-form-fieldRow input.form-control:focus {
  border-color: #2d6a4f !important;
  outline: none;
}

/* Radio / checkbox sąrašas */
.reg-modal-body .custom-checkbox-radio-list {
  background: #f8faf7;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid #e8f5e9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.reg-modal-body .custom-control {
  padding-left: 1.6rem;
}

.reg-modal-body .custom-control-label {
  font-size: 13px !important;
  line-height: 1.5 !important;
  cursor: pointer;
}

/* Submit mygtukas */
.reg-modal-body .ml-form-embedSubmit {
  margin-top: 8px !important;
}

.reg-modal-body .ml-form-embedSubmit button.primary {
  background-color: #1b4332 !important;
  border-radius: 50px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 14px 24px !important;
  letter-spacing: 0.3px;
  transition: background-color 0.2s !important;
}

.reg-modal-body .ml-form-embedSubmit button.primary:hover {
  background-color: #2d6a4f !important;
}

/* Sėkmės žinutė */
.reg-modal-body .ml-form-successBody {
  padding: 32px 0 !important;
  text-align: center;
}

.reg-modal-body .ml-form-successContent h4 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #1b4332 !important;
  margin-bottom: 8px !important;
}

.reg-modal-body .ml-form-successContent p {
  color: #555 !important;
}

@media (max-width: 480px) {
  .reg-modal-box {
    border-radius: 16px;
    max-height: 95vh;
  }
  .reg-modal-header {
    padding: 28px 20px 16px;
    border-radius: 16px 16px 0 0;
  }
  .reg-modal-body {
    padding: 20px 16px 24px;
  }
  .reg-modal-box--wide {
    max-width: 100%;
  }
}
