/* ============================================
   Cookie Consent Banner - Çerez Bildirimi
   v1.1 — Kompakt layout, mobil uyumlu
   ============================================ */

/* Reset & Base */
.cc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.cc-overlay.cc-active {
  opacity: 1;
  visibility: visible;
}

/* Main Panel */
.cc-panel {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  padding: 0;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.cc-overlay.cc-active .cc-panel {
  transform: translateY(0);
}

/* Header */
.cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px 12px 32px;
  border-bottom: 1px solid #e8e8e8;
}

.cc-header h2 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.cc-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.cc-close-btn:hover {
  opacity: 0.6;
}

.cc-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: #1a1a1a;
  stroke-width: 2;
}

/* ============================================
   Main View — Metin solda, butonlar sağda (tek satır)
   ============================================ */
.cc-main-view {
  padding: 16px 32px 20px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.cc-desc-wrapper {
  flex: 1;
  min-width: 0;
}

.cc-description {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: #333333;
  margin: 0;
  text-align: left;
}

.cc-description a {
  color: #333333;
  text-decoration: underline;
}

.cc-description a:hover {
  color: #009fe3;
}

/* "Daha fazla" linki — mobilde metin kısaltma */
.cc-read-more {
  display: none; /* masaüstünde gizli */
  color: #009fe3;
  font-weight: 600;
  cursor: pointer;
  font-size: 12.5px;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 4px 0 0 0;
  font-family: inherit;
}

/* Butonlar — sağda yatay sıralı */
.cc-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.cc-btn {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

/* Tümüne İzin Ver */
.cc-btn-accept-all {
  background: #009fe3;
  color: #ffffff;
  border: 2px solid #009fe3;
}

.cc-btn-accept-all:hover {
  background: #0082ba;
  border-color: #0082ba;
}

/* Tümünü Reddet */
.cc-btn-reject-all {
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
}

.cc-btn-reject-all:hover {
  background: #f0f7fd;
  border-color: #009fe3;
  color: #009fe3;
}

/* Çerez Ayarlarını Özelleştir */
.cc-btn-customize {
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
}

.cc-btn-customize:hover {
  background: #f0f7fd;
  border-color: #009fe3;
  color: #009fe3;
}

/* ============================================
   Settings View (Ayarlar Görünümü)
   ============================================ */
.cc-settings-view {
  display: none;
  padding: 24px 32px 28px 32px;
}

.cc-settings-view.cc-active {
  display: block;
}

/* Cookie Categories Grid */
.cc-categories {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.cc-category {
  padding: 0;
}

.cc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cc-category-title {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

.cc-category-desc {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #444444;
  margin: 0;
}

/* Toggle Switch */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  border-radius: 24px;
  transition: background-color 0.3s ease;
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.cc-toggle input:checked + .cc-toggle-slider {
  background-color: #009fe3;
}

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

.cc-toggle input:disabled + .cc-toggle-slider {
  cursor: not-allowed;
  opacity: 0.85;
}

/* Save Button */
.cc-settings-footer {
  display: flex;
  justify-content: flex-end;
}

.cc-btn-save {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 32px;
  background: #009fe3;
  color: #ffffff;
  border: 2px solid #009fe3;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.cc-btn-save:hover {
  background: #0082ba;
  border-color: #0082ba;
}

/* ============================================
   Responsive — Mobil
   ============================================ */
@media (max-width: 768px) {
  /* Mobilde tam ekran overlay yapma, sadece alt bar */
  .cc-overlay {
    background: rgba(0, 0, 0, 0.35);
  }

  .cc-panel {
    max-height: none; /* tam ekran kaplamasın */
  }

  .cc-header {
    padding: 12px 16px 10px 16px;
  }

  .cc-header h2 {
    font-size: 16px;
  }

  .cc-main-view {
    padding: 12px 16px 16px 16px;
    flex-direction: column;
    gap: 12px;
  }

  /* Mobilde metin kısalt */
  .cc-description {
    font-size: 12px;
    line-height: 1.5;
  }

  .cc-description.cc-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cc-description.cc-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .cc-read-more {
    display: inline-block;
  }

  /* Butonlar mobilde dikey */
  .cc-buttons {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .cc-btn {
    width: 100%;
    font-size: 13px;
    padding: 10px 16px;
  }

  .cc-settings-view {
    padding: 16px;
  }

  .cc-categories {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .cc-btn {
    font-size: 12.5px;
    padding: 9px 14px;
  }

  .cc-header h2 {
    font-size: 15px;
  }
}

/* ============================================
   Floating Re-open Button — DEVRE DIŞI
   ============================================ */
.cc-reopen-btn {
  display: none !important;
}
