/* === kaynak: components.css 2214-2275 (BOLUM 5: empty states + form errors) - Z-2 sprint === */

   BOLUM 5: EMPTY STATE DESIGNS
   ═══════════════════════════════════════════════════════════════════ */

.th-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--th-space-12) var(--th-space-6);
  gap: var(--th-space-4);
}
.th-empty-state__icon {
  width: var(--th-empty-icon-size);
  height: var(--th-empty-icon-size);
  color: var(--th-empty-icon-color);
  font-size: var(--th-text-5xl);
}
.th-empty-state__title {
  font-size: var(--th-empty-title-font);
  font-weight: var(--th-font-semibold);
  color: var(--th-empty-title-color);
  margin: 0;
}
.th-empty-state__desc {
  font-size: var(--th-empty-desc-font);
  color: var(--th-empty-desc-color);
  max-width: 400px;
  margin: 0;
}
.th-empty-state__cta {
  margin-top: var(--th-space-2);
}


/* ═══════════════════════════════════════════════════════════════════
   BOLUM 6: ERROR STATE DESIGNS
   ═══════════════════════════════════════════════════════════════════ */

/* ── 6B: Form Error Message ── */
.th-form-error {
  display: flex;
  align-items: center;
  gap: var(--th-space-1);
  font-size: var(--th-text-xs);
  color: var(--th-color-danger);
  margin-top: var(--th-space-1);
}
.th-form-error::before {
  content: '\26A0';
  flex-shrink: 0;
}

/* ── 6D: Image Fallback ── */
.th-img-error {
  opacity: 0.5;
  object-fit: contain;
  background: var(--th-color-bg-tertiary);
}


/* ═══════════════════════════════════════════════════════════════════
   FAZ 5.5 — FORM & INPUT İYİLEŞTİRME
   ═══════════════════════════════════════════════════════════════════ */

/* ── Floating Label Input ── */
.th-float-field {
  position: relative;
  margin-bottom: var(--th-space-4);
}
.th-float-field__input {
  width: 100%;
  padding: var(--th-space-4) var(--th-space-4) var(--th-space-2);
  font-size: var(--th-text-base);
  color: var(--th-color-text);
  background: var(--th-color-bg);
  border: var(--th-border-width-default) solid var(--th-color-border);
  border-radius: var(--th-radius-lg);
  outline: none;
  transition: border-color var(--th-transition-fast), box-shadow var(--th-transition-fast);
}
.th-float-field__label {
  position: absolute;
  left: var(--th-space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--th-text-base);
  color: var(--th-color-text-muted);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--th-color-bg);
  padding: 0 var(--th-space-1);
}
.th-float-field__input:focus + .th-float-field__label,
.th-float-field__input:not(:placeholder-shown) + .th-float-field__label {
  top: 0;
  font-size: var(--th-text-xs);
  color: var(--th-color-primary);
  font-weight: var(--th-font-medium);
}
.th-float-field__input:focus {
  border-color: var(--th-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-color-primary) 10%, transparent);
}
.th-float-field__input[rows] {
  min-height: 100px;
  resize: vertical;
}
.th-float-field__input[rows] + .th-float-field__label {
  top: var(--th-space-4);
  transform: none;
}
.th-float-field__input[rows]:focus + .th-float-field__label,
.th-float-field__input[rows]:not(:placeholder-shown) + .th-float-field__label {
  top: -2px;
  transform: none;
}

/* ── Inline Validation States ── */
.th-float-field--error .th-float-field__input {
  border-color: var(--th-color-danger);
}
.th-float-field--error .th-float-field__label {
  color: var(--th-color-danger);
}
.th-float-field--success .th-float-field__input {
  border-color: var(--th-color-success);
}
.th-float-field--success .th-float-field__label {
  color: var(--th-color-success);
}
.th-float-field__feedback {
  display: flex;
  align-items: center;
  gap: var(--th-space-1);
  margin-top: var(--th-space-1);
  font-size: var(--th-text-xs);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.th-float-field--error .th-float-field__feedback,
.th-float-field--success .th-float-field__feedback {
  opacity: 1;
  transform: translateY(0);
}
.th-float-field--error .th-float-field__feedback {
  color: var(--th-color-danger);
}
.th-float-field--success .th-float-field__feedback {
  color: var(--th-color-success);
}
.th-float-field__feedback i {
  font-size: var(--th-text-sm);
}

/* ── Şifre Güçlülük Göstergesi ── */
.th-password-strength {
  display: flex;
  gap: var(--th-space-1);
  margin-top: var(--th-space-2);
}
.th-password-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--th-color-bg-tertiary);
  border-radius: var(--th-radius-full);
  overflow: hidden;
  transition: background 0.3s ease;
}
.th-password-strength[data-strength="1"] .th-password-strength__bar:nth-child(1) {
  background: var(--th-color-danger);
}
.th-password-strength[data-strength="2"] .th-password-strength__bar:nth-child(-n+2) {
  background: var(--th-amber-500);
}
.th-password-strength[data-strength="3"] .th-password-strength__bar:nth-child(-n+3) {
  background: var(--th-color-success);
}
.th-password-strength[data-strength="4"] .th-password-strength__bar {
  background: var(--th-color-success);
}
.th-password-strength__label {
  font-size: var(--th-text-xs);
  font-weight: var(--th-font-medium);
  margin-top: var(--th-space-1);
}
.th-password-strength[data-strength="1"] ~ .th-password-strength__label { color: var(--th-color-danger); }
.th-password-strength[data-strength="2"] ~ .th-password-strength__label { color: var(--th-amber-600); }
.th-password-strength[data-strength="3"] ~ .th-password-strength__label,
.th-password-strength[data-strength="4"] ~ .th-password-strength__label { color: var(--th-color-success); }

/* ── Şifre Göster/Gizle Toggle ── */
.th-password-toggle {
  position: absolute;
  right: var(--th-space-3);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--th-color-text-muted);
  padding: var(--th-space-2);
  font-size: var(--th-text-base);
  transition: color var(--th-transition-fast);
}
.th-password-toggle:hover {
  color: var(--th-color-text);
}

/* ── Telefon Format Input ── */
.th-phone-field {
  position: relative;
}
.th-phone-field__prefix {
  position: absolute;
  left: var(--th-space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--th-text-base);
  color: var(--th-color-text-muted);
  font-weight: var(--th-font-medium);
  pointer-events: none;
}
.th-phone-field .th-float-field__input {
  padding-left: var(--th-space-12);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

/* ── Cascading Select (il → ilçe → mahalle) ── */
.th-cascade {
  display: grid;
  gap: var(--th-space-3);
}
.th-cascade--inline {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  .th-cascade--inline {
    grid-template-columns: 1fr;
  }
}
.th-cascade__select {
  width: 100%;
  padding: var(--th-space-3) var(--th-space-4);
  padding-right: var(--th-space-10);
  font-size: var(--th-text-base);
  color: var(--th-color-text);
  background: var(--th-color-bg);
  border: var(--th-border-width-default) solid var(--th-color-border);
  border-radius: var(--th-radius-lg);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--th-transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--th-space-4) center;
}
.th-cascade__select:focus {
  border-color: var(--th-color-primary);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-color-primary) 10%, transparent);
}
.th-cascade__select:disabled {
  background: var(--th-color-bg-tertiary);
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Kupon Auto-apply Badge ── */
.th-coupon-auto {
  display: inline-flex;
  align-items: center;
  gap: var(--th-space-1-5);
  padding: var(--th-space-1-5) var(--th-space-3);
  background: var(--th-orange-50);
  border: var(--th-border-width-default) dashed var(--th-color-accent);
  border-radius: var(--th-radius-md);
  font-size: var(--th-text-sm);
  font-weight: var(--th-font-semibold);
  color: var(--th-color-accent);
  animation: th-coupon-shimmer 2s ease-in-out infinite;
}
@keyframes th-coupon-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.th-coupon-auto i { font-size: var(--th-text-base); }

/* ═══════════════════════════════════════════════════════════════════
