/* =========================================================
   REPRO İSTANBUL — Çerez Onay Sistemi (Phase 10A)
   Fully independent: own file, own classes (cookiebar__*,
   cookiemodal__*), self-contained design tokens (does not
   depend on styles.css or any other stylesheet — this file is
   meant to be loaded, unchanged, on every page: the homepage
   and the three legal pages). Injected at runtime by cookies.js.
   Does not read or alter any existing section's CSS.
   ========================================================= */

:root {
  --cc-bg: #0B0C0E;
  --cc-surface: #14161A;
  --cc-border: rgba(255, 255, 255, 0.08);
  --cc-text: #F3F4F6;
  --cc-text-secondary: #9CA3AF;
  --cc-cyan: #00E5FF;
  --cc-green: #00FF66;
  --cc-mono: 'IBM Plex Mono', monospace;
  --cc-body: 'Inter', 'Satoshi', system-ui, sans-serif;
  --cc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Bottom HUD bar --- */
.cookiebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99998;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--cc-bg);
  border-top: 1px solid var(--cc-border);
  transform: translateY(100%);
  transition: transform 0.4s var(--cc-ease);
}
.cookiebar.is-visible {
  transform: translateY(0);
}

.cookiebar__text {
  margin: 0;
  max-width: 640px;
  font-family: var(--cc-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cc-text-secondary);
}
.cookiebar__tag {
  font-family: var(--cc-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--cc-text);
}

.cookiebar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookiebar__btn {
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 11px 16px;
  border-radius: 4px;
  border: 1px solid var(--cc-border);
  background: transparent;
  color: var(--cc-text);
  cursor: pointer;
  transition: border-color 0.3s var(--cc-ease), color 0.3s var(--cc-ease), background 0.3s var(--cc-ease);
  white-space: nowrap;
}
.cookiebar__btn--manage {
  border-color: transparent;
  color: var(--cc-text-secondary);
  text-decoration: underline;
  padding-left: 4px;
  padding-right: 4px;
}
.cookiebar__btn--manage:hover { color: var(--cc-text); }
.cookiebar__btn--necessary:hover { border-color: var(--cc-cyan); color: var(--cc-cyan); }
.cookiebar__btn--all {
  background: var(--cc-cyan);
  border-color: var(--cc-cyan);
  color: #05181c;
  font-weight: 500;
}
.cookiebar__btn--all:hover { filter: brightness(1.08); }

/* --- Preference modal --- */
.cookiemodal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--cc-ease), visibility 0s linear 0.3s;
}
.cookiemodal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--cc-ease), visibility 0s linear 0s;
}
.cookiemodal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cookiemodal__box {
  position: relative;
  z-index: 1;
  width: min(92vw, 480px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  padding: 40px 32px 32px;
  transform: translateY(12px);
  transition: transform 0.3s var(--cc-ease);
}
.cookiemodal.is-open .cookiemodal__box {
  transform: translateY(0);
}
.cookiemodal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--cc-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s var(--cc-ease);
}
.cookiemodal__close:hover { color: var(--cc-cyan); }

.cookiemodal__eyebrow {
  margin: 0 0 12px;
  font-family: var(--cc-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-text-secondary);
}
.cookiemodal__title {
  font-family: var(--cc-mono);
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 18px;
  color: var(--cc-text);
  margin: 0 0 12px;
}
.cookiemodal__desc {
  font-family: var(--cc-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cc-text-secondary);
  margin: 0 0 24px;
}

.cookiemodal__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--cc-border);
}
.cookiemodal__row:last-of-type { border-bottom: 1px solid var(--cc-border); }
.cookiemodal__row-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cookiemodal__row-text strong {
  font-family: var(--cc-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cc-text);
}
.cookiemodal__row-text span {
  font-family: var(--cc-body);
  font-size: 12px;
  color: var(--cc-text-secondary);
}

.cookiemodal__toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.cookiemodal__toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.cookiemodal__toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  transition: border-color 0.3s var(--cc-ease);
}
.cookiemodal__toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cc-text-secondary);
  transition: transform 0.25s var(--cc-ease), background 0.25s var(--cc-ease);
}
.cookiemodal__toggle input:checked + .cookiemodal__toggle-track {
  border-color: var(--cc-green);
}
.cookiemodal__toggle input:checked + .cookiemodal__toggle-track .cookiemodal__toggle-thumb {
  transform: translateX(18px);
  background: var(--cc-green);
}
.cookiemodal__toggle--locked .cookiemodal__toggle-track { opacity: 0.6; }
.cookiemodal__toggle input:disabled { cursor: not-allowed; }

.cookiemodal__save {
  width: 100%;
  margin-top: 24px;
  font-family: var(--cc-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 15px 22px;
  border-radius: 4px;
  border: 1px solid var(--cc-cyan);
  background: var(--cc-cyan);
  color: #05181c;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.3s var(--cc-ease);
}
.cookiemodal__save:hover { filter: brightness(1.08); }

.cookiemodal__links {
  margin: 20px 0 0;
  text-align: center;
  font-family: var(--cc-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--cc-text-secondary);
}
.cookiemodal__links a {
  color: var(--cc-text-secondary);
  text-decoration: underline;
}
.cookiemodal__links a:hover { color: var(--cc-cyan); }

/* 860px matches the site-wide mobile breakpoint used by every
   other section — this used to be 700px, so between 701-860px
   the cookie bar stayed in its wide desktop row layout while
   the rest of the page had already reflowed to mobile. */
@media (max-width: 860px) {
  .cookiebar {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 18px 20px;
  }
  .cookiebar__actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .cookiebar, .cookiemodal, .cookiemodal__box, .cookiemodal__toggle-thumb, .cookiemodal__toggle-track {
    transition: none !important;
  }
}

@media print {
  .cookiebar, .cookiemodal { display: none !important; }
}
