/* ═══════════════════════════════════════════════════════════════
   SPRINT 3b — Mobil Sticky Bar + KVKK Cookie Banner CSS
   ═══════════════════════════════════════════════════════════════ */

/* ─── MOBIL STICKY BAR ───────────────────────────────────────── */

.kc-sticky-bar {
  display: none; /* Default gizli, sadece mobile'da görünür */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: rgba(14, 13, 11, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(196, 122, 42, 0.3);
  padding: 8px 6px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.35);
  gap: 6px;
  animation: kcStickySlideUp 0.5s 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes kcStickySlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Sadece mobile */
@media (max-width: 768px) {
  .kc-sticky-bar { display: flex; }
  /* Body'e padding ekle → içerik sticky bar arkasında kalmasın */
  body { padding-bottom: 78px; }
}

.kc-sticky-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 6px;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.kc-sticky-btn:active {
  transform: scale(0.93);
}

.kc-sticky-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.kc-sticky-icon svg {
  width: 100%;
  height: 100%;
}

.kc-sticky-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
}

/* Stiller */
.kc-sticky-copper {
  background: linear-gradient(180deg, #c47a2a 0%, #b06a1f 100%);
  color: white;
}
.kc-sticky-copper:active { background: #a86119; }

.kc-sticky-green {
  background: #25d366;
  color: white;
}
.kc-sticky-green:active { background: #1eb957; }

.kc-sticky-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f0e8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.kc-sticky-dark:active { background: rgba(255, 255, 255, 0.15); }

.kc-sticky-outline {
  background: transparent;
  color: #c47a2a;
  border: 1px solid rgba(196, 122, 42, 0.5);
}
.kc-sticky-outline:active { background: rgba(196, 122, 42, 0.12); }


/* ─── KVKK COOKIE BANNER ─────────────────────────────────────── */

.kc-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(14, 13, 11, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(196, 122, 42, 0.45);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.55);
  color: #f4f0e8;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px 20px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.kc-cookie-banner.kc-cookie-visible {
  transform: translateY(0);
}

.kc-cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.kc-cookie-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.kc-cookie-title {
  margin: 0 0 6px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f4f0e8;
}

.kc-cookie-text {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: rgba(244, 240, 232, 0.78);
  max-width: 720px;
}

.kc-cookie-text strong {
  color: #d99a4e;
  font-weight: 600;
}

.kc-cookie-text a {
  color: #d99a4e;
  text-decoration: underline;
}

.kc-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kc-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.kc-cookie-btn-primary {
  background: #c47a2a;
  color: white;
  border-color: #c47a2a;
}
.kc-cookie-btn-primary:hover {
  background: #d99a4e;
  border-color: #d99a4e;
}

.kc-cookie-btn-outline {
  background: transparent;
  color: #f4f0e8;
  border-color: rgba(244, 240, 232, 0.35);
}
.kc-cookie-btn-outline:hover {
  background: rgba(244, 240, 232, 0.08);
  border-color: rgba(244, 240, 232, 0.55);
}

.kc-cookie-btn-text {
  background: transparent;
  color: rgba(244, 240, 232, 0.72);
  border-color: transparent;
  padding: 10px 12px;
  text-decoration: underline;
}
.kc-cookie-btn-text:hover {
  color: #d99a4e;
}

/* ── Countdown spinner ── */
.kc-cookie-countdown {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(244, 240, 232, 0.55);
  transition: opacity 0.3s;
}
.kc-cookie-countdown.kc-cookie-countdown-stopped {
  opacity: 0.35;
}
.kc-cookie-countdown strong {
  color: #d99a4e;
  font-weight: 700;
  font-size: 0.92rem;
}

.kc-cookie-spinner {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.kc-spinner-bg {
  stroke: rgba(196, 122, 42, 0.18);
}
.kc-spinner-fg {
  stroke: #c47a2a;
  stroke-linecap: round;
  transition: stroke-dashoffset linear;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .kc-cookie-banner {
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .kc-cookie-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .kc-cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .kc-cookie-btn {
    padding: 12px 18px;
    width: 100%;
  }
  .kc-cookie-title {
    font-size: 1rem;
  }
  .kc-cookie-text {
    font-size: 0.82rem;
  }
}


/* ─── COOKIE SETTINGS MODAL ──────────────────────────────────── */

.kc-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0s 0.25s;
}
.kc-cookie-modal.kc-cookie-modal-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s, visibility 0s;
}
.kc-cookie-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}
.kc-cookie-modal-inner {
  position: relative;
  z-index: 1;
  background: #151310;
  color: #f4f0e8;
  border: 1px solid rgba(196, 122, 42, 0.25);
  border-radius: 8px;
  width: 100%;
  max-width: 580px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', system-ui, sans-serif;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.kc-cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(196, 122, 42, 0.18);
}
.kc-cookie-modal-header h3 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  color: #f4f0e8;
}
.kc-cookie-modal-close {
  background: transparent;
  border: none;
  color: rgba(244, 240, 232, 0.55);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.kc-cookie-modal-close:hover {
  color: #f4f0e8;
  background: rgba(255, 255, 255, 0.06);
}

.kc-cookie-modal-body {
  overflow-y: auto;
  padding: 18px 22px;
}

.kc-cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(196, 122, 42, 0.18);
}

/* Cookie kategori kartı */
.kc-cookie-category {
  padding: 14px 0;
  border-bottom: 1px solid rgba(244, 240, 232, 0.06);
}
.kc-cookie-category:last-child {
  border-bottom: none;
}

.kc-cookie-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 14px;
}

.kc-cookie-category-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f4f0e8;
}

.kc-cookie-category-desc {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: rgba(244, 240, 232, 0.6);
  line-height: 1.5;
}

/* Toggle switch */
.kc-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.kc-cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.kc-cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(244, 240, 232, 0.15);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s;
}
.kc-cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
}
.kc-cookie-toggle input:checked + .kc-cookie-toggle-slider {
  background: #c47a2a;
}
.kc-cookie-toggle input:checked + .kc-cookie-toggle-slider::before {
  transform: translateX(20px);
}
.kc-cookie-toggle-locked .kc-cookie-toggle-slider {
  background: rgba(196, 122, 42, 0.4);
  cursor: not-allowed;
}
.kc-cookie-toggle-locked .kc-cookie-toggle-slider::before {
  transform: translateX(20px);
}

.kc-cookie-privacy-note {
  margin: 20px 0 4px;
  font-size: 0.78rem;
  color: rgba(244, 240, 232, 0.5);
  padding-top: 14px;
  border-top: 1px solid rgba(244, 240, 232, 0.06);
}
.kc-cookie-privacy-note a {
  color: #d99a4e;
  text-decoration: underline;
}

/* Modal mobile */
@media (max-width: 600px) {
  .kc-cookie-modal { padding: 0; }
  .kc-cookie-modal-inner {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }
}


/* ─── ADMIN STICKY BAR EDITOR ──────────────────────────────── */

.sticky-bar-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sticky-bar-row {
  display: grid;
  grid-template-columns: 24px 1fr 1fr 1.5fr 130px 110px 36px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: rgba(196, 122, 42, 0.04);
  border: 1px solid rgba(196, 122, 42, 0.18);
  border-radius: 4px;
}

.sticky-bar-row-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(196, 122, 42, 0.15);
  color: #d99a4e;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.sticky-bar-row input,
.sticky-bar-row select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(196, 122, 42, 0.15);
  color: #f4f0e8;
  border-radius: 3px;
  font-size: 0.82rem;
}

.sticky-bar-row .btn-remove {
  background: rgba(217, 64, 64, 0.12);
  color: #d94040;
  border: 1px solid rgba(217, 64, 64, 0.3);
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
}
.sticky-bar-row .btn-remove:hover {
  background: rgba(217, 64, 64, 0.25);
}

.sticky-bar-preview {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px dashed rgba(196, 122, 42, 0.25);
}
.sticky-bar-preview .preview-label {
  font-size: 0.78rem;
  color: rgba(244, 240, 232, 0.55);
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .sticky-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .sticky-bar-row-num { width: auto; height: auto; border-radius: 3px; padding: 4px 10px; }
}
