/* ===================================================================
   Skip-to-content link — klavye kullanıcılarının header navigasyonunu
   atlayıp ana içeriğe gitmesini sağlar. Sadece focus alınca görünür.
   =================================================================== */
.tdp-skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 9999;
  padding: 12px 18px;
  background: #c41e3a;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: top 0.18s ease;
}
.tdp-skip-link:focus,
.tdp-skip-link:focus-visible {
  top: 8px;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ===================================================================
   TDP Error / 404 / Loading sayfaları için stil seti.
   layout.tsx'in son CSS imports'undan biri olarak yüklenir.
   .PhoneInputCountryIcon vb. ile karışmasın diye hepsi tdp-error-* prefix'li.
   =================================================================== */

.tdp-error-shell {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--tdp-surface-muted, #f8f8f8) 100%);
}

.tdp-error-card {
  max-width: 560px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: #ffffff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 44px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -16px rgba(15, 23, 42, 0.12);
}

.tdp-error-logo {
  width: 96px;
  height: auto;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 8px rgba(196, 30, 58, 0.15));
}

.tdp-error-code {
  font-size: clamp(72px, 14vw, 128px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--tdp-primary, #c41e3a) 0%, #8c1428 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 4px 0 8px;
}

.tdp-error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(196, 30, 58, 0.1);
  color: var(--tdp-primary, #c41e3a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.tdp-error-icon svg {
  width: 30px;
  height: 30px;
}

.tdp-error-title {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  color: var(--tdp-secondary, #1a1a2e);
  margin: 0;
  line-height: 1.25;
}

.tdp-error-message {
  font-size: 15.5px;
  color: var(--tdp-body-text, #4a5568);
  line-height: 1.7;
  margin: 0;
  max-width: 440px;
}

.tdp-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.tdp-error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.tdp-error-btn--primary {
  background: var(--tdp-primary, #c41e3a);
  color: #ffffff;
}
.tdp-error-btn--primary:hover {
  background: #a8172e;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(196, 30, 58, 0.5);
}

.tdp-error-btn--ghost {
  background: #ffffff;
  color: var(--tdp-primary, #c41e3a);
  border-color: var(--tdp-primary, #c41e3a);
}
.tdp-error-btn--ghost:hover {
  background: rgba(196, 30, 58, 0.06);
  transform: translateY(-1px);
}

.tdp-error-btn--neutral {
  background: #ffffff;
  color: var(--tdp-secondary, #1a1a2e);
  border-color: #e5e7eb;
}
.tdp-error-btn--neutral:hover {
  background: var(--tdp-surface-muted, #f8f8f8);
  border-color: #d1d5db;
}

.tdp-error-btn:focus-visible {
  outline: 2px solid var(--tdp-primary, #c41e3a);
  outline-offset: 3px;
}

/* "Belki şu sayfalar ilgini çekebilir" link cards (404 page) */
.tdp-error-helpful {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #eef0f3;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tdp-error-helpful-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin: 0;
}

.tdp-error-helpful-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.tdp-error-helpful-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--tdp-surface-muted, #f8f8f8);
  color: var(--tdp-secondary, #1a1a2e);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: left;
}
.tdp-error-helpful-link:hover {
  background: rgba(196, 30, 58, 0.06);
  border-color: rgba(196, 30, 58, 0.2);
  color: var(--tdp-primary, #c41e3a);
}

.tdp-error-helpful-link svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--tdp-primary, #c41e3a);
}

/* Debug details (only visible if error has digest in dev) */
.tdp-error-details {
  margin-top: 18px;
  font-size: 12.5px;
  color: #6b7280;
  text-align: left;
  width: 100%;
  max-width: 440px;
}
.tdp-error-details summary {
  cursor: pointer;
  user-select: none;
  padding: 6px 0;
  font-weight: 500;
}
.tdp-error-details code {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--tdp-surface-muted, #f8f8f8);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Loading skeleton — TDP brand pulse, no jarring spinner */
.tdp-loading-shell {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
}

.tdp-loading-pulse {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--tdp-primary, #c41e3a);
}
.tdp-loading-pulse img {
  width: 64px;
  height: 64px;
  animation: tdp-pulse 1.4s ease-in-out infinite;
}
.tdp-loading-pulse span {
  font-size: 13.5px;
  color: var(--tdp-body-text, #6b7280);
  font-weight: 500;
}

@keyframes tdp-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50%      { opacity: 1;   transform: scale(1.02); }
}

/* Mobil daraltma */
@media (max-width: 540px) {
  .tdp-error-shell { padding: 48px 16px; }
  .tdp-error-card { padding: 32px 22px; gap: 14px; }
  .tdp-error-actions { flex-direction: column; width: 100%; }
  .tdp-error-btn { width: 100%; justify-content: center; }
}
