/* =========================================
   KVKK Uyumlu Çerez Banner Stili
   Hukuki Dayanak: KVKK Kurul 2022/1358 ve 2022/229
   Site renkleri: --c-primary (#0f2037), --c-accent (#d4a017)
   ========================================= */

/* Banner ana kapsayıcı */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-top: 3px solid var(--c-primary, #0f2037);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  padding: 1.25rem 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1a1a1a;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}
.cookie-banner.visible { transform: translateY(0); }

.cookie-banner__content {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner__text { flex: 1 1 60%; min-width: 280px; }
.cookie-banner__title { font-weight: 600; margin: 0 0 0.25rem; font-size: 1rem; }
.cookie-banner__description { margin: 0; font-size: 0.875rem; color: #4a4a4a; }
.cookie-banner__description a {
  color: var(--c-primary-2, #1a3a5f);
  text-decoration: underline;
}
.cookie-banner__buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.625rem 1.125rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.cookie-btn--accept {
  background: var(--c-primary, #0f2037);
  color: #fff;
  border-color: var(--c-primary, #0f2037);
}
.cookie-btn--accept:hover { background: var(--c-primary-2, #1a3a5f); border-color: var(--c-primary-2, #1a3a5f); }
.cookie-btn--reject {
  background: #fff;
  color: var(--c-primary, #0f2037);
  border-color: var(--c-primary, #0f2037);
}
.cookie-btn--reject:hover { background: #f3f6fb; }
.cookie-btn--manage {
  background: #f3f4f6;
  color: #1a1a1a;
  border-color: #d1d5db;
}
.cookie-btn--manage:hover { background: #e5e7eb; }

/* Modal — Detaylı Çerez Ayarları */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 55, 0.55);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: cb-fadeIn 0.2s ease-out;
}
.cookie-modal-overlay.visible { display: flex; }
@keyframes cb-fadeIn { from { opacity: 0; } to { opacity: 1; } }

.cookie-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border-top: 4px solid var(--c-accent, #d4a017);
}
.cookie-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.cookie-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-primary, #0f2037);
}
.cookie-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  line-height: 1;
}
.cookie-modal__close:hover { color: #1a1a1a; }
.cookie-modal__intro {
  font-size: 0.875rem;
  color: #4a4a4a;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}
.cookie-category {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.cookie-category__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.cookie-category__title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  color: var(--c-primary, #0f2037);
}
.cookie-category__description {
  font-size: 0.825rem;
  color: #4a4a4a;
  margin: 0.25rem 0 0;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--c-primary, #0f2037); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-slider { background: #94a3b8; cursor: not-allowed; }

.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.cookie-prefs-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--c-accent, #d4a017);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  font-family: inherit;
}
.cookie-prefs-link:hover { color: #fff; }

/* YouTube placeholder */
.yt-placeholder {
  background: var(--c-bg-alt, #f5f7fa);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem 1.25rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.yt-placeholder__inner { max-width: 460px; }
.yt-placeholder__title {
  font-weight: 600;
  color: var(--c-primary, #0f2037);
  margin: 0 0 0.5rem;
}
.yt-placeholder__text {
  margin: 0 0 1rem;
  color: #4a4a4a;
  font-size: 0.9rem;
}
.yt-placeholder__btn {
  background: var(--c-primary, #0f2037);
  color: #fff;
  border: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.yt-placeholder__btn:hover { background: var(--c-primary-2, #1a3a5f); }

/* Mobile */
@media (max-width: 640px) {
  .cookie-banner { padding: 1rem; }
  .cookie-banner__content { flex-direction: column; align-items: stretch; }
  .cookie-banner__buttons { flex-direction: column; }
  .cookie-btn { width: 100%; }
  .cookie-modal { padding: 1.25rem; }
}

/* a11y */
.cookie-btn:focus-visible,
.cookie-modal__close:focus-visible,
.cookie-prefs-link:focus-visible,
.yt-placeholder__btn:focus-visible {
  outline: 2px solid var(--c-accent, #d4a017);
  outline-offset: 2px;
}
