/* Contact form — validation, alerts, KVKK, modal */

.ngps-contact-form .tp-postbox-details-input input.error,
.ngps-contact-form .tp-postbox-details-input textarea.error,
.ngps-contact-form .ngps-contact-select.error {
  border-color: #d93025;
  box-shadow: 0 0 0 1px rgba(217, 48, 37, 0.15);
}

.ngps-contact-select-wrap {
  position: relative;
}

.ngps-contact-form .ngps-contact-select {
  width: 100%;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  cursor: pointer;
  color: #030303;
}

.ngps-contact-form .ngps-contact-select:invalid,
.ngps-contact-form .ngps-contact-select option[disabled] {
  color: #888888;
}

.ngps-contact-select-chevron {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  pointer-events: none;
  color: #030303;
  line-height: 0;
}

.ngps-contact-form-field--select .ngps-contact-form-error {
  margin-top: 8px;
}

.ngps-contact-form-error {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #d93025;
}

.ngps-contact-form-error[hidden] {
  display: none !important;
}

.ngps-contact-form-alert {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
}

.ngps-contact-form-alert[hidden] {
  display: none !important;
}

.ngps-contact-form-alert.is-success {
  background: #edf9e8;
  border: 1px solid #b7e3a8;
  color: #1f5d12;
}

.ngps-contact-form-alert.is-error {
  background: #fff1f0;
  border: 1px solid #f3b5b0;
  color: #8f1f18;
}

.ngps-contact-kvkk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.ngps-contact-kvkk-check {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 2px;
}

.ngps-contact-kvkk-input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.ngps-contact-kvkk-box {
  width: 20px;
  height: 20px;
  border: 1.5px solid #030303;
  border-radius: 4px;
  background: #fff;
  display: inline-block;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ngps-contact-kvkk-input:checked + .ngps-contact-kvkk-box {
  background: #febe10;
  border-color: #030303;
  box-shadow: inset 0 0 0 3px #fff;
}

.ngps-contact-kvkk-input:focus-visible + .ngps-contact-kvkk-box {
  outline: 2px solid #030303;
  outline-offset: 2px;
}

.ngps-contact-kvkk-text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--tp-common-black, #030303);
}

.ngps-contact-kvkk-link {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.ngps-contact-kvkk-link:hover,
.ngps-contact-kvkk-link:focus-visible {
  color: var(--tp-grey-1, #666);
}

#contact-form-submit.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

#contact-form-submit:disabled {
  cursor: not-allowed;
}

/* KVKK modal — body'ye taşınır (smooth-scroll transform fixed'i bozar) */
.ngps-kvkk-modal {
  --ngps-kvkk-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ngps-kvkk-ease), visibility 0.3s var(--ngps-kvkk-ease);
}

.ngps-kvkk-modal:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ngps-kvkk-modal[hidden] {
  display: none !important;
}

.ngps-kvkk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 3, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ngps-kvkk-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(calc(100vh - 48px), 720px);
  margin: auto;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s var(--ngps-kvkk-ease), opacity 0.35s var(--ngps-kvkk-ease);
}

.ngps-kvkk-modal:not([hidden]) .ngps-kvkk-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ngps-kvkk-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #030303;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ngps-kvkk-modal-close:hover,
.ngps-kvkk-modal-close:focus-visible {
  background: #febe10;
}

.ngps-kvkk-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 32px 28px 36px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.65;
  color: #030303;
}

.ngps-kvkk-modal-body > h2:first-child,
.ngps-kvkk-modal-body #contact-kvkk-modal-title {
  margin: 0 48px 16px 0;
  font-size: 28px;
  line-height: 1.25;
}

html.ngps-kvkk-modal-open,
body.ngps-kvkk-modal-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .ngps-kvkk-modal {
    padding: 16px 12px;
  }

  .ngps-kvkk-modal-dialog {
    max-height: calc(100vh - 32px);
    border-radius: 12px;
  }

  .ngps-kvkk-modal-body {
    padding: 24px 18px 28px;
  }
}
