/* Sofy's Sweets — banner cookie-uri, setări și butonul plutitor 🍪
   (aceeași structură ca pe zemos.ro / 82design, cu culorile bomboana) */
body { padding-bottom: var(--cc-banner-height, 0px); }
html { scroll-padding-bottom: calc(var(--cc-banner-height, 0px) + 1rem); }

.cc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10050;
  display: none; max-height: 75dvh; overflow-y: auto;
  padding: 1.3rem clamp(1rem, 5vw, 3rem);
  background: var(--surface); color: var(--ink);
  border-top: 2px solid var(--line); border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 40px -18px rgba(120, 30, 70, 0.35);
  font-family: var(--body);
}
.cc.cc--vizibil { display: block; animation: cc-in 0.5s var(--ease, ease) both; }
@keyframes cc-in { from { transform: translateY(100%); } to { transform: none; } }

.cc__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); flex-wrap: wrap; }
.cc__text { flex: 1 1 420px; min-width: 0; }
.cc__cap { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.cc__cap::before { content: '🍪 '; }
.cc__p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); max-width: 72ch; }
.cc__link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.cc__butoane { display: flex; gap: 0.6rem; flex: 0 0 auto; flex-wrap: wrap; }
/* Refuzul și acceptul sunt identice ca formă; diferă doar textul. */
.cc__buton {
  min-width: 140px; min-height: 46px; padding: 0 1.3rem;
  font: inherit; font-weight: 700; font-size: 0.92rem;
  color: var(--ink); background: var(--bg); border: 2px solid var(--ink); border-radius: 999px;
  cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring, ease);
}
.cc__buton:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.cc__buton:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cc__buton--pers { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.cc__buton--pers:hover { background: var(--tint-pink); color: var(--ink); }

/* Butonul din subsol */
.cc__declansator { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cc__declansator:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Butonul plutitor 🍪: rămâne disponibil după ce bannerul dispare */
.cc__fab {
  position: fixed; left: 1.25rem; bottom: calc(1.25rem + var(--cc-banner-height, 0px)); z-index: 10040;
  width: 52px; height: 52px; display: grid; place-items: center; padding: 0;
  color: var(--on-accent); background: var(--accent); border: 3px solid var(--surface); border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(209, 41, 95, 0.6); cursor: pointer;
  transition: transform 0.35s var(--spring, ease);
}
.cc__fab:hover { transform: rotate(-15deg) scale(1.08); }
.cc__fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cc__fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cc__fab[hidden] { display: none; }

/* Fereastra de setări */
.cc__modal { position: fixed; inset: 0; z-index: 10060; display: grid; place-items: center; padding: 1rem; background: rgba(43, 22, 48, 0.55); }
.cc__modal[hidden] { display: none; }
.cc__panel {
  width: min(620px, 100%); max-height: min(88vh, 740px); overflow: auto;
  color: var(--ink); background: var(--surface); border-radius: 26px;
  box-shadow: 0 30px 80px -20px rgba(43, 22, 48, 0.55);
}
.cc__modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.5rem 1.5rem 1rem; }
.cc__modal-head .cc__cap { font-size: 0.85rem; color: var(--accent); }
.cc__modal-head .cc__cap::before { content: none; }
.cc__modal-head h2 { margin: 0.25rem 0 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cc__close { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--tint-pink); color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.cc__close:hover { background: var(--accent); color: var(--on-accent); }
.cc__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 1.5rem; }
.cc__tab { height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-soft); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.cc__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cc__tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cc__modal-body { padding: 1.2rem 1.5rem; }
.cc__tab-panel > p { color: var(--ink-soft); line-height: 1.6; }
.cc__tab-panel[hidden] { display: none; }
.cc__category { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: 1rem 1.1rem; border-radius: 18px; background: var(--bg); }
.cc__category > div { flex: 1; min-width: 0; }
.cc__category p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }
.cc__always { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--tint-mint); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.cc__toggle { position: relative; display: inline-flex; flex: none; align-items: center; cursor: pointer; }
.cc__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc__toggle em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cc__toggle span { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--line); transition: background-color 0.2s; }
.cc__toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform 0.25s var(--spring, ease); }
.cc__toggle input:checked + span { background: var(--accent); }
.cc__toggle input:checked + span::after { transform: translateX(20px); }
.cc__toggle input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.cc__toggle:has(input:disabled) { cursor: not-allowed; opacity: 0.55; }
.cc__inventory { margin-top: 1rem; display: grid; gap: 10px; }
.cc__inventory > div { padding: 0.9rem 1.1rem; border-radius: 16px; background: var(--bg); }
.cc__inventory strong { display: block; font-family: ui-monospace, monospace; font-size: 0.9rem; }
.cc__inventory span { display: block; margin-top: 0.2rem; color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.cc__inventory p { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; }
.cc__modal-links a { color: var(--accent); font-weight: 600; }
.cc__modal-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.5rem 1.5rem 1.5rem; }
.cc__modal-actions button {
  flex: 1 1 150px; min-height: 46px; padding: 0 1rem; border-radius: 999px;
  font: inherit; font-weight: 700; color: var(--ink); background: var(--bg); border: 2px solid var(--ink); cursor: pointer;
}
.cc__modal-actions button:first-child { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.cc__modal-actions button:hover { transform: translateY(-1px); }

/* În subsol arată ca linkurile vecine */
.site-footer .cc__declansator { font-size: inherit; color: inherit; }

@media (max-width: 700px) {
  .cc { padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; }
  .cc__inner { flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .cc__text { flex: 0 1 auto; }
  .cc__butoane { width: 100%; }
  .cc__buton { flex: 1 1 0; min-width: 0; padding: 0 0.6rem; }
  .cc__buton--pers { flex-basis: 100%; }
  .cc__fab { left: 1rem; bottom: calc(1rem + var(--cc-banner-height, 0px) + env(safe-area-inset-bottom, 0px)); }
  .cc__modal { padding: 0.6rem; }
  .cc__modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cc__modal-actions button:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .cc.cc--vizibil { animation: none; }
  .cc__buton, .cc__fab { transition: none; }
}
