:root {
  --cc-accent: linear-gradient(135deg, #AA6C39 0%, #C88A5E 100%);
  --cc-accent-solid: #AA6C39;
  --cc-bg: #ffffff;
  --cc-bg-soft: #f8f9fa;
  --cc-text: #1a1a1a;
  --cc-text-soft: #5a5a5a;
  --cc-border: #e9ecef;
  --cc-radius: 16px;
  --cc-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.04);
  --cc-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --cc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --cc-font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

#cc-wrap {
  font-family: var(--cc-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== BANNER ========== */
#cc-wrap .cc-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%) scale(0.95);
  opacity: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  width: calc(100% - 32px);
  max-width: 1050px;
  z-index: 9999;
  transition: var(--cc-transition);
  backdrop-filter: blur(10px);
}

#cc-wrap .cc-banner.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

#cc-wrap .cc-banner-inner {
  padding: 24px 28px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

#cc-wrap .cc-banner-text {
  display: flex;
  gap: 16px;
  font-size: 15px;
  color: var(--cc-text-soft);
  line-height: 1.6;
}

#cc-wrap .cc-cookie-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(170, 108, 57, 0.1) 0%, rgba(200, 138, 94, 0.15) 100%);
  color: var(--cc-accent-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========== BUTTONS ========== */
#cc-wrap .cc-btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--cc-transition);
  background: transparent;
  white-space: nowrap;
}

#cc-wrap .cc-btn.primary {
  background: var(--cc-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(170, 108, 57, 0.25);
}

#cc-wrap .cc-btn.outline {
  border: 2px solid transparent;
  background: linear-gradient(var(--cc-bg), var(--cc-bg)) padding-box, var(--cc-accent) border-box;
  color: var(--cc-accent-solid);
}

/* ========== MODAL ========== */
#cc-wrap .cc-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#cc-wrap .cc-modal.show {
  display: flex;
}

#cc-wrap .cc-modal-box {
  background: var(--cc-bg);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  max-width: 900px;
  width: 100%;
  max-height: 90vh; /* Mobilde taşmayı önler */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Close Button */
#ccModalClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--cc-bg-soft);
  color: var(--cc-text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--cc-transition);
}

/* ========== LAYOUT ========== */
#cc-wrap .cc-modal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  overflow: hidden;
}

#cc-wrap .cc-sidebar {
  background: var(--cc-bg-soft);
  border-right: 1px solid var(--cc-border);
  padding: 20px 0;
  overflow-y: auto;
}

#cc-wrap .cc-tab {
  width: 100%;
  padding: 14px 24px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--cc-text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--cc-transition);
}

#cc-wrap .cc-tab.active {
  background: var(--cc-bg);
  color: var(--cc-accent-solid);
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--cc-accent-solid);
}

#cc-wrap .cc-content {
  padding: 32px;
  overflow-y: auto;
  background: var(--cc-bg);
}

#cc-wrap .cc-panel { display: none; }
#cc-wrap .cc-panel.active { display: block; animation: fadeInUp 0.3s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#cc-wrap .cc-panel h3 { font-size: 22px; margin-bottom: 12px; color: var(--cc-text); }
#cc-wrap .cc-panel p { font-size: 14px; color: var(--cc-text-soft); line-height: 1.6; }

/* TOGGLE STYLE */
#cc-wrap .cc-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px;
  background: var(--cc-bg-soft);
  border-radius: 12px;
  margin-top: 20px;
  max-width: 100%;
  color:var(--cc-text-soft);
}
.cc-toggle-label{margin-left:10px;}

#cc-wrap .cc-toggle-text { display: flex; flex-direction: column; gap: 4px; }
#cc-wrap .cc-toggle-text strong { font-size: 14px; color: var(--cc-text); }
#cc-wrap .cc-toggle-text small { font-size: 12px; color: var(--cc-text-soft); }

#cc-wrap .cc-toggle-switch {
  width: 48px;
  height: 24px;
  background: #cbd5e0;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: .3s;
}

#cc-wrap .cc-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
}

#cc-wrap .cc-toggle input:checked + .cc-toggle-switch { background: var(--cc-accent-solid); }
#cc-wrap .cc-toggle input:checked + .cc-toggle-switch::after { left: 26px; }

/* FOOTER */
#cc-wrap .cc-modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--cc-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--cc-bg);
}

/* ========== MOBILE OPTIMIZATION ========== */
@media (max-width: 900px) {
  #cc-wrap .cc-banner-inner {
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }
  
  #cc-wrap .cc-banner-text { flex-direction: column; align-items: center; }

  #cc-wrap .cc-modal-box {
    max-height: 85vh;
    margin-top: auto; /* Mobilde aşağıya yaslanabilir veya ortada kalır */
    border-radius: 20px 20px 0 0;
  }

  #cc-wrap .cc-modal-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  #cc-wrap .cc-sidebar {
    display: flex;
    overflow-x: auto;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--cc-border);
    flex-shrink: 0;
    scrollbar-width: none;
  }

  #cc-wrap .cc-sidebar::-webkit-scrollbar { display: none; }

  #cc-wrap .cc-tab {
    padding: 15px 20px;
    white-space: nowrap;
    width: auto;
    box-shadow: none;
  }

  #cc-wrap .cc-tab.active {
    box-shadow: inset 0 -3px 0 var(--cc-accent-solid);
  }

  #cc-wrap .cc-content {
    padding: 20px;
    -webkit-overflow-scrolling: touch;
  }

  #cc-wrap .cc-modal-footer {
    flex-direction: column;
    padding: 16px;
  }

  #cc-wrap .cc-modal-footer .cc-btn {
    width: 100%;
  }
  
  #ccModalClose {
       top: -4px;
    right: -3px;
    width: 32px;
    height: 32px;
    border-radius: 0;
  }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  :root {
    --cc-bg: #121212;
    --cc-bg-soft: #1e1e1e;
    --cc-text: #eee;
    --cc-text-soft: #a0a0a0;
    --cc-border: #333;
  }
  #cc-wrap .cc-banner { background: rgba(30, 30, 30, 0.95); }
  #ccModalClose { background: #2a2a2a; }
}
