/* ── Aybuge Contact Form UI Components ──────────────────────────────── */

/* ── FORM FIELD BASE ─────────────────────────────────────────────────── */
.cf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink-600);
  font-family: inherit;
}

/* ── INPUT ───────────────────────────────────────────────────────────── */
.cf-input {
  padding: 11px 14px;
  border: 1.5px solid var(--color-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--color-ink-950);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
}

.cf-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
}

.cf-input.is-valid {
  border-color: #22c55e;
}

.cf-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.cf-input::placeholder {
  color: var(--color-ink-400);
}

/* ── SELECT ──────────────────────────────────────────────────────────── */
.cf-select {
  padding: 11px 36px 11px 14px;
  border: 1.5px solid var(--color-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--color-ink-950);
  appearance: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235d7089' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.cf-select:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
}

/* ── TEXTAREA ────────────────────────────────────────────────────────── */
.cf-textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--color-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--color-ink-950);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 120px;
}

.cf-textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
}

.cf-textarea::placeholder {
  color: var(--color-ink-400);
}

/* ── VALIDATION MESSAGE ──────────────────────────────────────────────── */
.cf-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  min-height: 18px;
  transition: opacity 0.2s;
}

.cf-hint.is-error {
  color: #ef4444;
}

.cf-hint.is-success {
  color: #22c55e;
}

.cf-hint svg {
  flex-shrink: 0;
}

/* ── INPUT WITH ICON (telefon, mail) ─────────────────────────────────── */
.cf-input-wrap {
  position: relative;
}

.cf-input-wrap .cf-input {
  padding-left: 40px;
}

.cf-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-ink-400);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.cf-input-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.cf-input-status.visible {
  opacity: 1;
}

.cf-input-status.is-ok { color: #22c55e; }
.cf-input-status.is-err { color: #ef4444; }

/* ── GÖRSEL EKLEME ──────────────────────────────────────────────────── */
.cf-media-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cf-media-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1.5px dashed #c9d7e3;
  border-radius: 12px;
  background: #f8fbfc;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.cf-media-picker:hover,
.cf-media-picker.is-dragging {
  border-color: var(--color-brand);
  background: rgba(16, 152, 162, .055);
  box-shadow: 0 0 0 3px var(--color-brand-soft);
}

.cf-media-picker__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--color-brand);
  background: rgba(16, 152, 162, .11);
}

.cf-media-picker__copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.cf-media-picker__copy strong {
  color: var(--color-ink-950);
  font-size: 13px;
  font-weight: 650;
}

.cf-media-picker__copy small {
  color: var(--color-ink-400);
  font-size: 11.5px;
  line-height: 1.4;
}

.cf-media-picker__action {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-brand-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}

.cf-media-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cf-media-preview:empty { display: none; }

.cf-media-preview__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: #edf3f6;
}

.cf-media-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cf-media-preview__item span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 6px;
  color: #fff;
  background: rgba(10, 37, 64, .78);
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cf-media-picker__action { display: none; }
  .cf-media-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── TOAST ───────────────────────────────────────────────────────────── */
#cf-toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.cf-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  animation: cf-slide-up 0.3s ease forwards;
  max-width: 340px;
  pointer-events: auto;
}

.cf-toast.success { background: #0f766e; }
.cf-toast.error   { background: #dc2626; }
.cf-toast.info    { background: var(--color-brand-deep); }

.cf-toast.cf-toast-out {
  animation: cf-slide-down 0.25s ease forwards;
}

@keyframes cf-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cf-slide-down {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}
