/**
 * Yasal bilgilendirme sayfaları — SSS, KVKK, çerez
 */

body:has(.legal-view:not(.hidden)) {
  background: #f0f3f7;
}

.legal-view {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: #1a2638;
  line-height: 1.55;
}

.legal-page {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 2px 10px rgba(26, 38, 56, 0.05);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #2a3f54;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.legal-page h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.legal-updated {
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.legal-page h2 {
  margin: 1.25rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a3f54;
}

.legal-page p,
.legal-page li {
  font-size: 0.92rem;
  color: #334155;
}

.legal-page ul,
.legal-page ol {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
}

.legal-faq-item {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eef1f6;
}

.legal-faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #1e293b;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef1f6;
  font-size: 0.85rem;
}

.legal-links button {
  padding: 0;
  border: none;
  background: none;
  color: #2a3f54;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.legal-contact-block {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
  font-size: 0.95rem;
  line-height: 1.55;
}

.legal-contact-block a {
  color: var(--link, #2563eb);
  text-decoration: none;
}

.legal-contact-block a:hover {
  text-decoration: underline;
}

.legal-note {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  background: #f1f5f9;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #64748b;
}

.welcome-legal-links,
.login-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin-top: 0.65rem;
  font-size: 0.78rem;
}

.welcome-legal-links button,
.login-legal-links button {
  padding: 0;
  border: none;
  background: none;
  color: #64748b;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.welcome-legal-links button:hover,
.login-legal-links button:hover {
  color: #2a3f54;
}

.login-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.65rem 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #475569;
  width: 100%;
  box-sizing: border-box;
}

.login-consent-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.login-consent-label {
  display: block;
  font-weight: 600;
  color: #334155;
}

.login-consent-detail {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.45;
}

.login-consent-detail button {
  white-space: normal;
  word-break: break-word;
}

.login-consent input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  max-width: 1rem;
  margin: 0.15rem 0 0;
  flex: 0 0 1rem;
  display: inline-block;
}

.login-consent button {
  padding: 0;
  border: none;
  background: none;
  color: #2a3f54;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0));
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 720px) {
  .cookie-banner {
    max-height: 42vh;
    overflow-y: auto;
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0));
  }
  .cookie-banner-text {
    font-size: 0.82rem;
    line-height: 1.35;
  }
  #view_login:not(.hidden) {
    padding-bottom: 8rem;
  }
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-right: 2rem;
}

.cookie-banner-close {
  position: absolute;
  top: 0.15rem;
  right: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-banner-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cookie-banner-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.cookie-banner-text button {
  padding: 0;
  border: none;
  background: none;
  color: #93c5fd;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cookie-banner-actions button {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-btn-accept {
  background: #2a3f54;
  color: #fff;
}

.cookie-btn-essential {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.cookie-prefs-link,
.welcome-legal-links .cookie-prefs-link,
.login-legal-links .cookie-prefs-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-prefs-fab {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(42, 63, 84, 0.14);
  background: #fff;
  color: #2d6a4f;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.cookie-prefs-fab.hidden {
  display: none !important;
}

.cookie-prefs-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-prefs-fab:hover,
.cookie-prefs-fab:focus-visible {
  background: #f0fdf4;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

@media (max-width: 720px) {
  .legal-view {
    padding: 0.75rem 0.65rem 2rem;
  }
  .legal-page {
    padding: 1rem;
  }
}
