/* =========================================================================
   Çerez bildirimi ve tercihleri — Sertify projesindeki bileşenden (css/common.css) aynen alındı.
   Yalnızca renkler (lacivert #02102a · altın #c9a54a) ve yazı tipi (Lexend Deca / Poppins) siteye uyarlandı.
   ========================================================================= */
.cookie-banner, .cookie-modal { font-family: 'Lexend Deca', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.cookie-banner *, .cookie-modal * { box-sizing: border-box; }

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1100;
  width: min(calc(100% - 48px), 1240px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background-color: #02102a;
  box-shadow: 0 10px 40px rgba(2, 16, 42, 0.45);
  opacity: 0;
  transform: translate(-50%, 24px);
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.active {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.cookie-banner-copy {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 32px;
}
.cookie-banner-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background-color: #0c1f45;
  color: #f1dc9e;
}
.cookie-banner-icon svg { width: 18px; height: 18px; }
.cookie-banner-text { min-width: 0; }
.cookie-banner-text h3 {
  margin: 0 0 6px;
  font-family: 'Poppins', 'Lexend Deca', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #9ba7c0;
}
.cookie-banner-text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(241, 220, 158, 0.55);
  transition: text-decoration-color 0.2s ease;
  white-space: nowrap;
}
.cookie-banner-text a:hover { text-decoration-color: #f1dc9e; }
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.cookie-banner-secondary { display: flex; gap: 12px; }
.cookie-banner-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cookie-banner-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #d5dcea;
}
.cookie-banner-btn-ghost:hover {
  background-color: #0c1f45;
  border-color: rgba(255, 255, 255, 0.26);
}
.cookie-banner-btn-primary {
  border: 0;
  background-color: #ffffff;
  color: #02102a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.cookie-banner-btn-primary:hover { background-color: #f1dc9e; }

/* ===== Cookie Modal ===== */
.cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 28, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1110;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.cookie-backdrop.active { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 1111;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background-color: #031634;
  border: 1px solid #1b2e57;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(2, 10, 28, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  pointer-events: none;
}
.cookie-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
  pointer-events: auto;
}
.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px 16px;
}
.cookie-modal-head h2 {
  margin: 0;
  font-family: 'Poppins', 'Lexend Deca', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.cookie-modal-close {
  background: none;
  border: none;
  color: #9ba7c0;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-modal-close:hover { color: #ffffff; }
.cookie-modal-close svg { width: 20px; height: 20px; }
.cookie-modal-desc {
  margin: 0;
  padding: 0 28px 24px;
  font-size: 14.5px;
  color: #a3aec4;
  line-height: 1.65;
}
.cookie-modal-list {
  padding: 0 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.cookie-modal-list::-webkit-scrollbar { width: 4px; }
.cookie-modal-list::-webkit-scrollbar-track { background: transparent; }
.cookie-modal-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 100px; }
.cookie-modal-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* Cookie Item */
.cookie-item {
  border: 1px solid #1b2e57;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.cookie-item:hover { border-color: #2c4475; }
.cookie-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
}
.cookie-item-header:focus-visible { outline: 2px solid #f1dc9e; outline-offset: -2px; border-radius: 16px; }
.cookie-item-title { font-size: 15px; font-weight: 600; color: #ffffff; }
.cookie-item-right { display: flex; align-items: center; gap: 8px; }
.cookie-item-always { font-size: 13px; font-weight: 500; color: #f1dc9e; }
.cookie-item-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #9ba7c0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}
.cookie-item.open .cookie-item-chevron { transform: rotate(180deg); }
.cookie-item-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.cookie-item-body-inner {
  padding: 0 16px 16px;
  font-size: 13.5px;
  color: #9ba7c0;
  line-height: 1.65;
}

/* Cookie Switch (gooey) */
.cookie-goo-defs { position: absolute; width: 0; height: 0; pointer-events: none; }
.cookie-switch {
  --input-width: 38px;
  --input-height: 24px;
  --input-background: #2a3d66;
  position: relative;
  display: table;
  border-radius: 12px;
  flex-shrink: 0;
}
.cookie-switch input {
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  border: none;
  display: block;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border-radius: inherit;
  width: var(--input-width);
  height: var(--input-height);
  background: var(--input-background);
  transition: background 0.35s ease;
}
.cookie-switch input:focus-visible { outline: 2px solid #f1dc9e; outline-offset: 2px; }
.cookie-switch input:checked { --input-background: #c9a54a; }
.cookie-switch svg {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  pointer-events: none;
  fill: #ffffff;
  transform: scale(1.01) translateZ(0);
}
.cookie-switch svg .default {
  transform-origin: 12px 12px;
  transform: translateX(var(--default-x, 0)) scale(var(--default-s, 1)) translateZ(0);
  transition: transform 0.3s ease;
}
.cookie-switch svg .dot {
  transform-origin: 26px 12px;
  transform: translateX(var(--dot-x, -8px)) scale(var(--dot-s, 0)) translateZ(0);
  transition: transform 0.3s ease;
}
.cookie-switch input:checked + svg .default { --default-s: 0; --default-x: 8px; }
.cookie-switch input:checked + svg .dot { --dot-s: 1; --dot-x: 0px; }
.cookie-switch input + svg .default { --default-s: 1; --default-x: 0px; }
.cookie-switch input + svg .dot { --dot-s: 0; --dot-x: -8px; }

/* Cookie Modal Footer */
.cookie-modal-foot {
  border-top: 1px solid #1b2e57;
  margin: 8px 28px 0;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cookie-modal-policy {
  color: #a3aec4;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(241, 220, 158, 0.45);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.cookie-modal-policy:hover { color: #ffffff; text-decoration-color: #f1dc9e; }
.cookie-modal-save {
  background-color: #ffffff;
  color: #02102a;
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.cookie-modal-save:hover { background-color: #f1dc9e; }

/* ===== Telefon ===== */
@media (max-width: 640px) {
  .cookie-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    transform: translateY(24px);
  }
  .cookie-banner.active { transform: translateY(0); }
  .cookie-banner-copy { width: 100%; align-items: flex-start; gap: 12px; padding-right: 0; }
  .cookie-banner-icon { display: none; }
  .cookie-banner-text h3 { display: block; margin-bottom: 8px; line-height: 1.35; }
  .cookie-banner-text p { font-size: 13px; line-height: 1.65; }
  .cookie-banner-text a { white-space: normal; }
  .cookie-banner-actions { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .cookie-banner-secondary { display: flex; width: 100%; gap: 10px; order: 2; }
  .cookie-banner-secondary .cookie-banner-btn { flex: 1 1 0; }
  .cookie-banner-btn { width: 100%; min-height: 44px; padding: 0 16px; }
  .cookie-banner-btn-primary { order: 1; }
  .cookie-modal { max-width: calc(100% - 32px); border-radius: 20px; }
  .cookie-modal-head { padding: 24px 20px 14px; }
  .cookie-modal-desc { padding: 0 20px 20px; font-size: 14px; }
  .cookie-modal-list { padding: 0 20px 8px; }
  .cookie-modal-foot { margin: 8px 20px 0; padding: 20px 0; }
}
@media (min-width: 641px) {
  .cookie-banner-text h3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner, .cookie-modal, .cookie-backdrop, .cookie-item-body { transition: none; }
}
/* Tablet (641–1023px): metin ve düğmeler yan yana sığmıyor; düğmeler metnin altına, sağa hizalı */
@media (min-width: 641px) and (max-width: 1023px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 20px; }
  .cookie-banner-copy { padding-right: 0; }
  .cookie-banner-actions { justify-content: flex-end; }
}

/* =========================================================================
   Mobil ve tablet (≤1023px): minimal çerez kartı
   Kısa tek cümle + küçük düğmeler; altta yüzen kart. Masaüstü görünümü değişmez.
   (Önceki ≤640px ve 641–1023px kuralları burada geçersiz kılınır.)
   ========================================================================= */
.cookie-banner-kisa { display: none; margin: 0; font-size: 13px; line-height: 1.5; color: #c4cde0; }
.cookie-banner-kisa a { color: #f1dc9e; font-weight: 500; text-decoration: none; white-space: nowrap; }
.cookie-banner-kisa a:hover { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 1023px) {
  .cookie-banner {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto; max-width: 720px; margin: 0 auto;
    flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px 14px; padding: 12px 12px 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
    transform: translateY(16px);
  }
  .cookie-banner.active { transform: translateY(0); }
  .cookie-banner-copy { flex: 1 1 260px; width: auto; align-items: center; gap: 10px; padding-right: 0; }
  .cookie-banner-icon { display: flex; width: 32px; height: 32px; flex: 0 0 32px; }
  .cookie-banner-icon svg { width: 16px; height: 16px; }
  .cookie-banner-text h3, .cookie-banner-text p:not(.cookie-banner-kisa) { display: none; }
  .cookie-banner-kisa { display: block; }
  .cookie-banner-actions { flex: 0 0 auto; width: auto; flex-direction: row; align-items: center; justify-content: flex-end; gap: 6px; }
  .cookie-banner-secondary { display: flex; width: auto; gap: 6px; order: 0; }
  .cookie-banner-secondary .cookie-banner-btn { flex: 0 0 auto; }
  .cookie-banner-btn, .cookie-banner-btn-primary { order: 0; width: auto; min-height: 34px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }
  /* "Tercihler" sade metin bağlantısı gibi */
  #cookieManage { border-color: transparent; background: transparent; color: #c4cde0; padding: 0 8px; }
  #cookieManage:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
  .cookie-uzun { display: none; }
}
@media (max-width: 480px) {
  .cookie-banner { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 12px; gap: 10px; }
  .cookie-banner-copy { flex-basis: 100%; }
  .cookie-banner-icon { display: none; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-secondary { flex: 2 1 0; }
  .cookie-banner-secondary .cookie-banner-btn { flex: 1 1 0; }
  #cookieAccept { flex: 1.3 1 0; }
}
