/* Fleura Nails — çerez rıza bildirimi.
   Masaüstünde kompakt, mobilde kolay okunup dokunulan bir alt panel.
   Sol altta WhatsApp (z-index 100), sağ altta scroll-top butonu var. */

.fn-cookie {
  position: fixed;
  z-index: 200;
  right: 12px;
  bottom: 12px;
  left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(430px, calc(100vw - 24px));
  padding: 9px 10px 9px 13px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(196, 164, 132, 0.34);
  box-shadow: 0 8px 26px rgba(36, 29, 23, 0.13);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: #2c2c2c;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

html[lang="ru"] .fn-cookie {
  font-family: "Manrope", "Plus Jakarta Sans", system-ui, sans-serif;
}

.fn-cookie[hidden] { display: none !important; }
.fn-cookie.is-in { opacity: 1; transform: translateY(0); }

/* Başlık kompakt barda gizli — ekran okuyucu için erişilebilir kalır */
.fn-cookie__title {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fn-cookie__text {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #5f4149;
}

.fn-cookie__text a {
  color: #a91f3d;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.fn-cookie__text a:hover { color: #72152b; }

.fn-cookie__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.fn-cookie__btn {
  flex: none;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.fn-cookie__btn:focus-visible { outline: 2px solid #a91f3d; outline-offset: 2px; }

.fn-cookie__btn--accept { background: #a91f3d; color: #fff; }
.fn-cookie__btn--accept:hover { background: #8d1932; }

.fn-cookie__btn--decline {
  background: transparent;
  color: #72152b;
  padding: 0 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fn-cookie__btn--decline:hover { background: rgba(143, 24, 51, 0.08); }

/* Yüzen butonlarla çakışmayı önle — bar ince olduğu için küçük bir kaydırma yeterli.
   --fn-cookie-h JS tarafından gerçek yükseklikle güncellenir. */
body.fn-cookie-open .scroll-top-btn {
  bottom: calc(var(--fn-cookie-h, 50px) + 24px) !important;
}

@media (max-width: 620px) {
  .fn-cookie {
    box-sizing: border-box;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-width: none;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 14px;
    border-color: rgba(114, 21, 43, 0.16);
    border-radius: 20px;
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 18px 55px rgba(60, 24, 35, 0.2), 0 2px 8px rgba(60, 24, 35, 0.08);
  }
  .fn-cookie__title {
    position: static;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 9px;
    width: auto;
    height: auto;
    margin: 0 0 3px;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    color: #321f25;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.25;
  }
  .fn-cookie__title svg {
    box-sizing: content-box;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    padding: 7px;
    border-radius: 50%;
    background: #f9e8e8;
    color: #a91f3d;
  }
  .fn-cookie__text {
    grid-column: 1 / -1;
    margin: 2px 0 8px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #60464d;
  }
  .fn-cookie__text a { font-weight: 700; }
  .fn-cookie__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }
  .fn-cookie__btn {
    width: 100%;
    min-height: 48px;
    padding: 0 10px;
    border-radius: 13px;
    font-size: 0.78rem;
    font-weight: 750;
  }
  .fn-cookie__btn--decline {
    border-color: rgba(114, 21, 43, 0.2);
    background: #fff;
    padding: 0 8px;
    text-decoration: none;
  }
  /* Mobilde bar tam genişlik olduğu için soldaki WhatsApp da yukarı alınır */
  body.fn-cookie-open .whatsapp-float,
  body.fn-cookie-open .scroll-top-btn {
    bottom: calc(var(--fn-cookie-h, 184px) + max(18px, env(safe-area-inset-bottom))) !important;
  }
}

@media (max-width: 350px) {
  .fn-cookie { padding: 12px; }
  .fn-cookie__actions { grid-template-columns: 1fr; }
  .fn-cookie__text { font-size: 0.79rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-cookie { transition: opacity 0.2s ease; transform: none; }
  .fn-cookie.is-in { transform: none; }
}
