/* ==========================================================================
   İskender Torunları İnşaat — Çerez İzin Yönetimi (CMP) stilleri
   Tüm seçiciler "it-cerez", "it-modal", "it-toast", "it-legal" önekleriyle
   kapsüllenmiştir; site temasıyla çakışmaz.
   ========================================================================== */

.it-cerez,
.it-cerez *,
.it-modal,
.it-modal *,
.it-toast,
.it-cerez-btn,
.it-legal-links,
.it-legal-links * {
  box-sizing: border-box;
}

.it-cerez,
.it-modal,
.it-toast {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.it-cerez [hidden],
.it-modal[hidden],
.it-toast[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- banner */
.it-cerez {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.it-cerez__panel {
  pointer-events: auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 18px;
  background: #1e1e1c;
  color: #fff;
  border: 1px solid rgba(194, 112, 62, 0.45);
  box-shadow: 0 24px 60px rgba(12, 12, 11, 0.38);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 16px;
  animation: it-cerez-in 0.35s ease both;
}

@keyframes it-cerez-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.it-cerez__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.it-cerez__icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(194, 112, 62, 0.5);
  color: #c2703e;
  background: rgba(194, 112, 62, 0.12);
}

.it-cerez__icon svg {
  width: 18px;
  height: 18px;
}

.it-cerez__title {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #fff;
}

.it-cerez__text {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.it-cerez__text a {
  color: #e2a278;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.it-cerez__text a:hover {
  color: #fff;
}

.it-cerez__actions {
  display: grid;
  gap: 9px;
}

.it-cerez__note {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

/* ---------------------------------------------------------------- buttons */
.it-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  background: none;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.it-btn:focus-visible {
  outline: 2px solid #c2703e;
  outline-offset: 2px;
}

.it-btn--accent {
  background: #c2703e;
  color: #fff;
}

.it-btn--accent:hover {
  background: #ad6134;
}

.it-btn--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.it-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.it-btn--dark {
  background: #1e1e1c;
  color: #fff;
}

.it-btn--dark:hover {
  background: #000;
}

.it-btn--link {
  padding: 12px 6px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
  text-underline-offset: 4px;
  letter-spacing: 0.1em;
}

.it-btn--link:hover {
  color: #fff;
}

.it-modal .it-btn--dark,
.it-modal .it-btn--accent {
  color: #fff;
}

/* ------------------------------------------------------------- preferences */
.it-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 14px;
}

.it-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 11, 0.62);
  backdrop-filter: blur(3px);
  animation: it-fade 0.2s ease both;
}

@keyframes it-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.it-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f7f5f0;
  color: #1e1e1c;
  border: 1px solid rgba(30, 30, 28, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  padding: 22px 20px 20px;
  animation: it-modal-in 0.24s ease both;
}

@keyframes it-modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.it-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.it-modal__eyebrow {
  margin: 0 0 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c2703e;
}

.it-modal__title {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.it-modal__close {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(30, 30, 28, 0.2);
  background: none;
  color: #1e1e1c;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}

.it-modal__close:hover {
  border-color: #c2703e;
  color: #c2703e;
}

.it-modal__close svg {
  width: 15px;
  height: 15px;
}

.it-modal__intro {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(30, 30, 28, 0.66);
}

.it-modal__intro a {
  color: #9c5427;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.it-cat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(30, 30, 28, 0.12);
}

.it-cat:first-of-type {
  margin-top: 16px;
}

.it-cat__title {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.it-badge {
  display: inline-block;
  padding: 4px 7px;
  background: rgba(30, 30, 28, 0.08);
  color: rgba(30, 30, 28, 0.6);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.it-cat__desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(30, 30, 28, 0.62);
}

.it-cat__meta {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(30, 30, 28, 0.52);
}

/* switch */
.it-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 26px;
  flex: none;
  margin-top: 2px;
}

.it-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.it-switch span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 28, 0.24);
  border-radius: 999px;
  transition: background-color 0.18s ease;
}

.it-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.it-switch input:checked + span {
  background: #c2703e;
}

.it-switch input:checked + span::after {
  transform: translateX(20px);
}

.it-switch input:disabled {
  cursor: not-allowed;
}

.it-switch input:disabled + span {
  background: rgba(194, 112, 62, 0.38);
  opacity: 1;
}

.it-switch input:disabled + span::after {
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(20px);
}

.it-switch input:focus-visible + span {
  outline: 2px solid #c2703e;
  outline-offset: 3px;
}

.it-modal__footer {
  display: grid;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid rgba(30, 30, 28, 0.12);
}

.it-modal__footer .it-btn--link {
  color: rgba(30, 30, 28, 0.7);
  text-align: center;
}

.it-modal__footer .it-btn--link:hover {
  color: #1e1e1c;
}

.it-modal__footnote {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(30, 30, 28, 0.5);
  text-align: center;
}

.it-modal__stamp {
  margin: 10px 0 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(30, 30, 28, 0.38);
}

/* --------------------------------------------------- settings floating btn */
.it-cerez-btn {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 9980;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  background: rgba(30, 30, 28, 0.94);
  color: #edeae4;
  border: 1px solid rgba(194, 112, 62, 0.42);
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(12, 12, 11, 0.22);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.it-cerez-btn:hover {
  background: #1e1e1c;
  border-color: #c2703e;
}

.it-cerez-btn:focus-visible {
  outline: 2px solid #c2703e;
  outline-offset: 2px;
}

.it-cerez-btn svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------------ toast */
.it-toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  z-index: 10020;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  background: #1e1e1c;
  color: #fff;
  border: 1px solid rgba(194, 112, 62, 0.55);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
}

.it-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------- footer legal link rows */
.it-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.it-legal-links a,
.it-legal-links button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.18s ease;
}

.it-legal-links a:hover,
.it-legal-links button:hover {
  color: #c2703e;
}

.it-legal-links button:focus-visible,
.it-legal-links a:focus-visible {
  outline: 2px solid #c2703e;
  outline-offset: 3px;
}

/* ---------------------------------------------------------- media queries */
@media (min-width: 560px) {
  .it-cerez__panel {
    padding: 22px 24px;
  }

  .it-cerez__actions {
    grid-auto-flow: column;
    justify-content: start;
  }
}

@media (min-width: 900px) {
  .it-cerez {
    padding: 0 24px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .it-cerez__panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;
    padding: 22px 26px;
  }

  .it-cerez__actions {
    justify-content: flex-end;
    grid-auto-flow: column;
  }

  .it-modal {
    padding: 24px;
  }

  .it-modal__panel {
    padding: 28px 30px 24px;
  }

  .it-modal__title {
    font-size: 25px;
  }
}

@media (max-width: 559px) {
  .it-cerez__panel {
    padding: 16px 16px 14px;
  }

  .it-cerez__title {
    font-size: 15.5px;
  }

  .it-cerez__text {
    font-size: 12.5px;
  }

  .it-cerez__actions {
    grid-template-columns: 1fr;
  }

  .it-cerez__actions .it-btn--link {
    padding: 6px;
  }

  .it-cerez__note {
    display: none;
  }

  .it-cerez-btn span {
    display: none;
  }

  .it-cerez-btn {
    padding: 11px;
  }

  .it-modal {
    padding: 0;
    align-items: end;
  }

  .it-modal__panel {
    max-width: none;
    max-height: 92vh;
    border-radius: 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .it-modal__footer .it-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .it-cerez__panel,
  .it-modal__panel,
  .it-modal__overlay {
    animation: none;
  }

  .it-toast,
  .it-switch span,
  .it-switch span::after,
  .it-btn {
    transition: none;
  }
}

html.it-modal-open,
html.it-modal-open body {
  overflow: hidden;
}

/* Sabit düğme ve panel, sayfa sonundaki alt bilgi içeriğini kapatmasın.
   Boşluk footer'ın içine eklenir; böylece sayfa sonunda renk boşluğu oluşmaz. */
html.it-cerez-btn-visible footer {
  padding-bottom: 92px;
}

html.it-cerez-visible footer {
  padding-bottom: calc(var(--it-cerez-yukseklik, 0px) + 26px);
}
