/* =========================================================
   fragCihan Cookie Consent – Apple Compact
   Complete replacement/fallback for missing cookie files.
   ========================================================= */

.fc-cookie-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 18px;
  pointer-events: none;
}

.fc-cookie-root.is-visible {
  display: flex;
}

.fc-cookie-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

.fc-cookie-banner {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(76vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 30px;
  padding: 22px;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  pointer-events: auto;
}

.fc-cookie-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  background: #f5f5f7;
  color: #0071e3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fc-cookie-title {
  margin: 14px 0 0;
  color: #1d1d1f;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.fc-cookie-text {
  margin: 14px 0 0;
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.65;
}

.fc-cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.fc-cookie-btn {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-cookie-btn:hover {
  transform: scale(1.015);
}

.fc-cookie-btn-primary {
  background: #0071e3;
  color: #fff;
}

.fc-cookie-btn-primary:hover {
  background: #0062c7;
}

.fc-cookie-btn-secondary {
  background: #f5f5f7;
  color: #1d1d1f;
}

.fc-cookie-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #86868b;
  font-size: 13px;
}

.fc-cookie-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fc-cookie-open {
  overflow: hidden !important;
}

html[data-theme="dark"] .fc-cookie-banner {
  color: #f5f5f7;
  background: rgba(29, 29, 31, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .fc-cookie-kicker,
html[data-theme="dark"] .fc-cookie-btn-secondary {
  background: #2b2b2b;
  color: #f5f5f7;
}

html[data-theme="dark"] .fc-cookie-title {
  color: #f5f5f7;
}

html[data-theme="dark"] .fc-cookie-text,
html[data-theme="dark"] .fc-cookie-links {
  color: #a1a1a6;
}

/* Compatibility with older class/id names */
.cookie-overlay,
#cookieOverlay,
#cookie-overlay,
.cookie-consent-overlay {
  z-index: 2147483000 !important;
}

.cookie-banner,
#cookieBanner,
#cookie-banner,
.cookie-consent-banner {
  z-index: 2147483001 !important;
  max-height: min(76vh, 620px) !important;
  overflow-y: auto !important;
}

/* Never leave site blurred after consent or when banner is hidden */
html.fc-cookie-consented body,
html.fc-cookie-consented main,
html.fc-cookie-consented header,
html.fc-cookie-consented footer,
body:not(.fc-cookie-open),
body:not(.fc-cookie-open) main,
body:not(.fc-cookie-open) header,
body:not(.fc-cookie-open) footer {
  filter: none !important;
}

html.fc-cookie-consented .fc-cookie-root,
html.fc-cookie-consented .cookie-overlay,
html.fc-cookie-consented #cookieOverlay,
html.fc-cookie-consented #cookie-overlay,
html.fc-cookie-consented .cookie-consent-overlay {
  display: none !important;
}

@media (max-width: 640px) {
  .fc-cookie-root {
    align-items: end;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .fc-cookie-banner {
    width: 100%;
    max-height: min(72vh, 560px);
    border-radius: 24px;
    padding: 18px;
  }

  .fc-cookie-title {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .fc-cookie-text {
    font-size: 14px;
    line-height: 1.55;
  }

  .fc-cookie-actions {
    grid-template-columns: 1fr;
  }

  .fc-cookie-btn {
    width: 100%;
    min-height: 46px;
  }
}
