/* ============================================================
   Cookie Consent — Banner + Settings Modal
   ============================================================ */

/* ---------- Banner (bottom bar) ---------- */
#cookieConsentBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0b1929 0%, #132f4c 100%);
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  padding: 16px 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease,
              visibility 0s 0.5s;
}

#cookieConsentBanner.cc-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease,
              visibility 0s 0s;
}

#cookieConsentBanner.cc-hiding {
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease,
              visibility 0s 0.5s;
}

.cc-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1 1 0;
  min-width: 280px;
  color: #b0bec5;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

.cc-banner-text a {
  color: #64b5f6;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.cc-banner-text a:hover {
  color: #90caf9;
}

.cc-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Shared button base */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.25s ease;
  font-family: inherit;
}

.cc-btn:focus-visible {
  outline: 2px solid #64b5f6;
  outline-offset: 2px;
}

/* Reject / outline style */
.cc-btn-reject {
  background: transparent;
  color: #cfd8dc;
  border: 1.5px solid rgba(207, 216, 220, 0.4);
}

.cc-btn-reject:hover {
  border-color: #cfd8dc;
  background: rgba(207, 216, 220, 0.08);
  color: #fff;
}

/* Manage / outline-primary style */
.cc-btn-manage {
  background: transparent;
  color: #64b5f6;
  border: 1.5px solid rgba(100, 181, 246, 0.5);
}

.cc-btn-manage:hover {
  background: rgba(100, 181, 246, 0.1);
  border-color: #64b5f6;
  color: #90caf9;
}

/* Accept / filled primary style */
.cc-btn-accept {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: #fff;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.35);
}

.cc-btn-accept:hover {
  background: linear-gradient(135deg, #1e88e5, #1976d2);
  box-shadow: 0 4px 20px rgba(25, 118, 210, 0.45);
  transform: translateY(-1px);
}

/* Save selection button — modal footer'da kullanılır, beyaz arka plan üzerinde */
.cc-btn-save {
  background: transparent;
  color: #1976d2;
  border: 1.5px solid #1976d2;
}

.cc-btn-save:hover {
  background: rgba(25, 118, 210, 0.08);
}

/* Modal reject button — beyaz arka plan üzerinde koyu metin */
.cc-modal-footer .cc-btn-reject {
  color: #37474f;
  border-color: rgba(55, 71, 79, 0.35);
}

.cc-modal-footer .cc-btn-reject:hover {
  color: #0b1929;
  border-color: #37474f;
  background: rgba(55, 71, 79, 0.06);
}

/* ---------- Overlay ---------- */
#cookieSettingsOverlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease,
              visibility 0s 0.35s;
}

#cookieSettingsOverlay.cc-overlay-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease,
              visibility 0s 0s;
}

/* ---------- Settings Modal ---------- */
.cc-settings-modal {
  background: #fff;
  border-radius: 16px;
  width: 92%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.92) translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease;
  position: relative;
}

#cookieSettingsOverlay.cc-overlay-visible .cc-settings-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal header */
.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.cc-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b1929;
}

.cc-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #0b1929;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}

.cc-modal-close:hover {
  background: #1565c0;
  transform: rotate(90deg);
}

/* Modal body */
.cc-modal-body {
  padding: 4px 28px 8px;
}

/* Category block */
.cc-category {
  padding: 20px 0;
  border-bottom: 1px solid #eeeff1;
}

.cc-category:last-child {
  border-bottom: none;
}

.cc-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cc-category-info {
  flex: 1 1 0;
}

.cc-category-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b1929;
}

.cc-category-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #546e7a;
  line-height: 1.5;
}

/* ---------- Toggle Switch ---------- */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-slider {
  display: block;
  width: 48px;
  height: 26px;
  background: #b0bec5;
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative;
}

.cc-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #1976d2;
}

.cc-toggle input:checked + .cc-toggle-slider::after {
  transform: translateX(22px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
  opacity: 0.7;
  cursor: default;
}

.cc-toggle-status {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #78909c;
  margin-top: 3px;
  text-transform: capitalize;
}

.cc-toggle input:checked ~ .cc-toggle-status {
  color: #1976d2;
}

/* Modal footer */
.cc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px 24px;
  border-top: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 0 16px;
  }

  .cc-banner-actions {
    justify-content: stretch;
  }

  .cc-banner-actions .cc-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .cc-modal-header {
    padding: 20px 20px 14px;
  }

  .cc-modal-body {
    padding: 4px 20px 8px;
  }

  .cc-modal-footer {
    padding: 14px 20px 20px;
  }

  .cc-modal-footer .cc-btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.76rem;
    padding: 10px 10px;
  }
}

/* ---------- Scrollbar (modal içi) ---------- */
.cc-settings-modal::-webkit-scrollbar {
  width: 6px;
}

.cc-settings-modal::-webkit-scrollbar-track {
  background: transparent;
}

.cc-settings-modal::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 3px;
}
