/* =========================
   OSNOVNO
   ========================= */

body.modal-open {
  overflow: hidden;
}

/* Wrapper za modal (kontakt + success) */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;                 /* zatvoren */
  align-items: center;           /* centriraj po visini */
  justify-content: center;       /* centriraj po širini */
  padding: 24px 16px;
}

/* Kada je modal otvoren */
.contact-modal.is-open {
  display: flex;
}

/* =========================
   BACKDROP
   ========================= */

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

/* =========================
   DIJALOG (osnovni stil)
   ========================= */

.contact-modal-dialog {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: #f9fafb;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  z-index: 1;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* lagano spusti modal malo ispod centara ekrana */
  transform: translateY(24px);
}

/* =========================
   CLOSE DUGME
   ========================= */

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
}

.contact-modal-close:hover {
  color: #111827;
}

/* =========================
   HEADER
   ========================= */

.contact-modal-header h2 {
  font-size: 18px;
  margin: 0 0 4px;
  color: #0f4c75;
}

.contact-modal-header p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #4b5563;
}

/* =========================
   FORMA
   ========================= */

.contact-modal-form {
  display: grid;
  gap: 10px;
}

/* honeypot polje */
.contact-hp {
  display: none;
}

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 3px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  font-size: 14px;
  padding: 7px 9px;
  box-sizing: border-box;
  outline: none;
  background: #ffffff;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: #3fd3c7;
  box-shadow: 0 0 0 1px rgba(63, 211, 199, 0.4);
}

/* =========================
   DUGME
   ========================= */

.contact-submit-btn {
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(90deg, #0f4c75, #3282b8);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 76, 117, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.contact-submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}

.contact-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 76, 117, 0.4);
}

/* =========================
   STATUS PORUKA
   ========================= */

.contact-modal-status {
  margin-top: 6px;
  font-size: 13px;
}

.contact-modal-status.is-success {
  color: #15803d;
}

.contact-modal-status.is-error {
  color: #b91c1c;
}

/* =========================
   SUCCESS MODAL
   ========================= */

.contact-modal-dialog-success {
  max-width: 420px;
  text-align: center;
  padding-top: 26px;
  /* nasljeđuje transform: translateY(24px) iz .contact-modal-dialog
     jer ima obje klase */
}

.contact-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.45);
  color: #ffffff;
}

.contact-success-icon i {
  font-size: 30px;
}

.contact-modal-dialog-success h2 {
  margin: 4px 0 4px;
  font-size: 18px;
  color: #14532d;
}

.contact-modal-dialog-success p {
  margin: 0;
  font-size: 14px;
  color: #166534;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 600px) {
  .contact-modal {
    align-items: flex-start;
    padding-top: 80px;             /* odmakni od samog vrha ekrana */
  }

  .contact-modal-dialog {
    margin: 30px 12px;
    padding: 18px 14px 14px;
    transform: none;               /* na mobu ide normalno ispod headera */
  }
}

.form-row-recaptcha {
  margin-top: 4px;
}

.form-row-recaptcha .g-recaptcha {
  transform: scale(0.96);
  transform-origin: left top;
}

