/* Evlüce Talep Formu
   Renkler tema tarafından --etf-* değişkenleriyle değiştirilebilir. */

.etf {
  --etf-ink: #f4f7fb;
  --etf-muted: rgba(232, 238, 248, 0.64);
  --etf-faint: rgba(232, 238, 248, 0.4);
  --etf-line: rgba(255, 255, 255, 0.1);
  --etf-line-hover: rgba(255, 255, 255, 0.2);
  --etf-field: rgba(255, 255, 255, 0.035);
  --etf-field-hover: rgba(255, 255, 255, 0.055);
  --etf-accent: #7dffca;
  --etf-accent-2: #6ee7ff;
  --etf-on-accent: #04121b;
  --etf-danger: #ff9b9b;
  --etf-radius: 14px;
  --etf-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  container: etf / inline-size;
  color: var(--etf-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.etf *,
.etf *::before,
.etf *::after {
  box-sizing: border-box;
}

.etf [hidden] {
  display: none !important;
}

.etf-form {
  display: grid;
  gap: 30px;
  margin: 0;
}

/* Gizli bot tuzağı */
.etf-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Adımlar ---------- */

.etf-step {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.etf-step + .etf-step {
  padding-top: 28px;
  border-top: 1px solid var(--etf-line);
}

.etf-step__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  float: left; /* legend'ın fieldset sınırına oturmasını engeller */
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  color: var(--etf-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.etf-step__title + * {
  clear: both;
}

.etf-step__num {
  color: var(--etf-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Marka kartları ---------- */

.etf-brands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@container etf (min-width: 600px) {
  .etf-brands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.etf-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.etf-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.etf-chip__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
  min-height: 56px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--etf-line);
  border-radius: var(--etf-radius);
  background: var(--etf-field);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--etf-ease), box-shadow 0.25s ease;
}

.etf-chip__name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.etf-chip__tick {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 3px;
  border: 1px solid var(--etf-line-hover);
  border-radius: 50%;
  color: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.35s var(--etf-ease);
}

/* Dar ekranda onay işareti köşeye alınır, marka adına yer kalır. */
@container etf (max-width: 459px) {
  .etf-chip__box {
    position: relative;
    padding-right: 30px;
  }

  .etf-chip__tick {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    padding: 2px;
  }
}

.etf-chip:hover .etf-chip__box {
  border-color: var(--etf-line-hover);
  background: var(--etf-field-hover);
}

.etf-chip input:checked + .etf-chip__box {
  border-color: var(--etf-accent);
  background: rgba(125, 255, 202, 0.07);
  box-shadow: 0 0 0 1px var(--etf-accent) inset;
}

.etf-chip input:checked + .etf-chip__box .etf-chip__tick {
  border-color: var(--etf-accent);
  background: var(--etf-accent);
  color: var(--etf-on-accent);
  transform: scale(1.05);
}

.etf-chip input:focus-visible + .etf-chip__box {
  outline: 2px solid var(--etf-accent-2);
  outline-offset: 2px;
}

.etf-chip:active .etf-chip__box {
  transform: scale(0.985);
}

/* ---------- Metin alanları (yüzen etiket) ---------- */

.etf-grid {
  display: grid;
  gap: 12px;
}

@container etf (min-width: 460px) {
  .etf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .etf-grid__full {
    grid-column: 1 / -1;
  }
}

.etf-field {
  position: relative;
  min-width: 0;
}

.etf-field input,
.etf-field select,
.etf-field textarea {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 26px 16px 8px;
  border: 1px solid var(--etf-line);
  border-radius: var(--etf-radius);
  background: var(--etf-field);
  color: var(--etf-ink);
  font: inherit;
  font-size: 16px; /* iOS yakınlaştırmasın */
  font-weight: 500;
  line-height: 1.3;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.etf-field textarea {
  height: auto;
  min-height: 124px;
  padding-top: 30px;
  resize: vertical;
  line-height: 1.55;
}

.etf-field select {
  padding-right: 44px;
  cursor: pointer;
}

.etf-field select option {
  background: #0b1019;
  color: #fff;
}

.etf-field label {
  position: absolute;
  top: 19px;
  left: 17px;
  right: 16px;
  overflow: hidden;
  color: var(--etf-faint);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.25s var(--etf-ease), color 0.25s ease;
}

.etf-field input:focus + label,
.etf-field input:not(:placeholder-shown) + label,
.etf-field textarea:focus + label,
.etf-field textarea:not(:placeholder-shown) + label,
.etf-field--select label {
  color: var(--etf-muted);
  transform: translateY(-10px) scale(0.78);
}

.etf-field input::placeholder,
.etf-field textarea::placeholder {
  color: transparent;
}

.etf-field:hover input,
.etf-field:hover select,
.etf-field:hover textarea {
  border-color: var(--etf-line-hover);
  background: var(--etf-field-hover);
}

.etf-field input:focus,
.etf-field select:focus,
.etf-field textarea:focus {
  border-color: var(--etf-accent);
  background: rgba(125, 255, 202, 0.035);
  box-shadow: 0 0 0 4px rgba(125, 255, 202, 0.12);
}

.etf-field input:focus + label,
.etf-field textarea:focus + label,
.etf-field select:focus + label {
  color: var(--etf-accent);
}

.etf-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--etf-ink);
  -webkit-box-shadow: 0 0 0 1000px #111826 inset;
  caret-color: var(--etf-ink);
}

.etf-field__chevron {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--etf-accent);
  pointer-events: none;
}

.etf-field__hint {
  position: absolute;
  top: 29px;
  left: 17px;
  color: var(--etf-faint);
  font-size: 16px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.etf-field input:focus:placeholder-shown ~ .etf-field__hint {
  opacity: 1;
}

/* ---------- Konu etiketleri ---------- */

.etf-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.etf-topic {
  position: relative;
  cursor: pointer;
}

.etf-topic input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.etf-topic span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--etf-line);
  border-radius: 999px;
  color: var(--etf-muted);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.etf-topic span::before {
  content: "+";
  font-weight: 700;
  color: var(--etf-faint);
  transition: color 0.2s ease;
}

.etf-topic:hover span {
  border-color: var(--etf-line-hover);
  color: var(--etf-ink);
}

.etf-topic input:checked + span {
  border-color: var(--etf-accent);
  background: rgba(125, 255, 202, 0.08);
  color: var(--etf-ink);
}

.etf-topic input:checked + span::before {
  content: "✓";
  color: var(--etf-accent);
}

.etf-topic input:focus-visible + span {
  outline: 2px solid var(--etf-accent-2);
  outline-offset: 2px;
}

/* ---------- KVKK onayı ---------- */

.etf-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.etf-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.etf-check__box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--etf-line-hover);
  border-radius: 7px;
  background: var(--etf-field);
  color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.etf-check__box svg {
  width: 16px;
  height: 16px;
}

.etf-check input:checked + .etf-check__box {
  border-color: var(--etf-accent);
  background: var(--etf-accent);
  color: var(--etf-on-accent);
}

.etf-check input:focus-visible + .etf-check__box {
  outline: 2px solid var(--etf-accent-2);
  outline-offset: 2px;
}

.etf-check__text {
  color: var(--etf-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.etf-check__text a {
  color: var(--etf-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(125, 255, 202, 0.6);
  text-underline-offset: 3px;
}

.etf-check__text a:hover {
  color: var(--etf-accent);
}

/* ---------- Gönder ---------- */

.etf-submit {
  display: grid;
  gap: 14px;
}

.etf-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 0 24px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--etf-accent-2), var(--etf-accent));
  color: var(--etf-on-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 18px 40px -16px rgba(125, 255, 202, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.35s var(--etf-ease), box-shadow 0.35s ease, filter 0.2s ease;
}

.etf-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.8s ease;
  pointer-events: none;
}

.etf-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -16px rgba(125, 255, 202, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.etf-button:hover::after {
  left: 130%;
}

.etf-button:active {
  transform: translateY(0) scale(0.99);
}

.etf-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.etf-button__arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--etf-ease);
}

.etf-button:hover .etf-button__arrow {
  transform: translateX(4px);
}

.etf-button__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(4, 18, 27, 0.25);
  border-top-color: var(--etf-on-accent);
  border-radius: 50%;
  animation: etf-spin 0.7s linear infinite;
}

.etf-form.is-sending .etf-button {
  cursor: progress;
  filter: saturate(0.7);
  transform: none;
}

.etf-form.is-sending .etf-button__spinner {
  display: block;
}

.etf-form.is-sending .etf-button__arrow {
  display: none;
}

@keyframes etf-spin {
  to {
    transform: rotate(360deg);
  }
}

.etf-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--etf-faint);
  font-size: 13px;
  text-align: center;
}

.etf-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--etf-accent);
}

/* ---------- Hatalar ---------- */

.etf-error {
  margin: 8px 2px 0;
  color: var(--etf-danger);
  font-size: 13px;
  font-weight: 600;
}

.etf-field.has-error input,
.etf-field.has-error select,
.etf-field.has-error textarea {
  border-color: rgba(255, 155, 155, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 155, 155, 0.08);
}

.etf-brands.has-error .etf-chip__box,
.etf-consent.has-error .etf-check__box {
  border-color: rgba(255, 155, 155, 0.55);
}

.etf-alert,
.etf-status:not(:empty) {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 155, 155, 0.35);
  border-radius: var(--etf-radius);
  background: rgba(255, 155, 155, 0.07);
  color: #ffd7d7;
  font-size: 14px;
  font-weight: 500;
}

.etf-status:empty {
  display: none;
}

.has-error-shake {
  animation: etf-shake 0.4s ease;
}

@keyframes etf-shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Başarı ---------- */

.etf-done {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 8px 20px;
  text-align: center;
  outline: none;
  animation: etf-rise 0.6s var(--etf-ease) both;
}

.etf-done__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  color: var(--etf-accent);
  filter: drop-shadow(0 10px 30px rgba(125, 255, 202, 0.35));
}

.etf-done__icon circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: etf-draw 0.7s var(--etf-ease) 0.1s forwards;
}

.etf-done__icon path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: etf-draw 0.45s var(--etf-ease) 0.65s forwards;
}

@keyframes etf-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes etf-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.etf-done__title {
  margin: 0;
  color: var(--etf-ink);
  font-size: clamp(22px, 4cqi, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.etf-done__text {
  max-width: 420px;
  margin: 0;
  color: var(--etf-muted);
  font-size: 15px;
}

.etf-done__no {
  margin: 6px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--etf-line);
  border-radius: 999px;
  color: var(--etf-muted);
  font-size: 13.5px;
}

.etf-done__no strong {
  color: var(--etf-ink);
  letter-spacing: 0.04em;
}

.etf-done__again {
  margin-top: 10px;
  color: var(--etf-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.etf-done__again:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .etf *,
  .etf *::before,
  .etf *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
