/* Mamy Czas – okienko zgody na cookies (korzysta ze zmiennych i przycisków z style.css) */
.cc { position: fixed; inset: auto 0 0 0; z-index: 120; padding: 16px; pointer-events: none; font-family: var(--sans); }
.cc[hidden] { display: none !important; }   /* musi wygrać z .cc.cc-modal { display: grid } */
.cc-backdrop { display: none; }
.cc-box {
  pointer-events: auto; position: relative;
  width: min(1100px, 100%); margin: 0 auto;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 18px 50px rgba(43, 42, 37, .22);
  padding: 22px 26px;
  display: grid; grid-template-columns: 1fr auto; gap: 14px 32px; align-items: center;
  animation: cc-in .35s ease;
}
.cc-box:focus { outline: none; }
.cc-main { display: flex; gap: 16px; align-items: flex-start; }
.cc-icon { flex: none; width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: rgba(169, 120, 79, .14); fill: var(--wood); }
.cc-icon circle { fill: var(--paper); }
.cc-text { min-width: 0; }
.cc-title { font-size: 1.45rem; margin: 0 0 .25em; }
.cc-desc { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.cc-desc a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btn { padding: 10px 20px; font-size: .86rem; white-space: nowrap; }
.cc-btn[hidden] { display: none; }
.cc-btn:focus-visible, .cc-switch input:focus-visible + .cc-slider, .cc details summary:focus-visible {
  outline: 2px solid var(--forest); outline-offset: 2px;
}

/* ---- tryb „Dostosuj” – okno na środku ekranu ---- */
.cc.cc-modal { inset: 0; display: grid; place-items: center; pointer-events: auto; }
.cc.cc-modal .cc-backdrop { display: block; position: absolute; inset: 0; background: rgba(20, 24, 18, .55); }
.cc.cc-modal .cc-box {
  width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 16px; align-items: stretch; overflow: hidden;
}
.cc.cc-modal .cc-actions { justify-content: stretch; border-top: 1px solid var(--line); padding-top: 16px; }
.cc.cc-modal .cc-btn { flex: 1 1 auto; }
.cc.cc-modal .cc-btn[data-cc="save"] { order: 2; }   /* główny przycisk ustawień – na końcu wiersza */
html.cc-lock { overflow: hidden; }

.cc-details { overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; padding: 0 8px; }
.cc-details[hidden] { display: none; }
.cc-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: var(--cream); }
.cc-group > p { margin: 6px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.cc-group details { margin-top: 8px; font-size: .82rem; }
.cc-group summary { cursor: pointer; color: var(--forest); font-weight: 700; }
.cc-group details p { margin: 6px 0 0; color: var(--muted); }
.cc-meta { font-size: .75rem; color: var(--muted); margin: 4px 0 0; word-break: break-word; }
.cc-meta:empty { display: none; }

/* przełącznik */
.cc-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.cc-group-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--forest-dark); }
.cc-group-name small { font-family: var(--sans); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); font-weight: 700; margin-left: 6px; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-slider { flex: none; position: relative; width: 46px; height: 26px; border-radius: 999px; background: #c9c3b6; transition: background .2s; }
.cc-slider::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, .25); transition: transform .2s; }
.cc-switch input:checked + .cc-slider { background: var(--forest); }
.cc-switch input:checked + .cc-slider::after { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { opacity: .55; }
.cc-switch:has(input:disabled) { cursor: default; }

/* link „Ustawienia cookies” w stopce (przycisk wyglądający jak link) */
.cc-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.site-footer .cc-link { color: #fff; }
.site-footer .cc-link:hover { color: #d7e2cf; }

/* zaślepka mapy Google (przed zgodą na cookies marketingowe) */
.consent-embed {
  min-height: 320px; display: grid; place-items: center; text-align: center; padding: 28px 24px;
  background: linear-gradient(135deg, rgba(140, 156, 127, .18), rgba(169, 120, 79, .12)), var(--cream);
}
.consent-embed p { max-width: 380px; margin: 0 auto 14px; color: var(--muted); font-size: .92rem; }
.consent-embed strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--forest-dark); margin-bottom: 6px; }
.consent-embed .btn { padding: 10px 22px; font-size: .86rem; }
.consent-embed .cc-link { display: block; margin: 12px auto 0; color: var(--forest); font-size: .85rem; font-weight: 700; text-decoration: underline; }

@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cc-box { animation: none; } }

@media (max-width: 1024px) { .consent-embed { min-height: 280px; } }
@media (max-width: 860px) {
  .cc-box { grid-template-columns: 1fr; padding: 20px 18px; }
  .cc-actions { justify-content: stretch; }
  .cc-btn { flex: 1 1 calc(50% - 5px); }
  .cc-btn[data-cc="customize"], .cc-btn[data-cc="save"] { order: 1; flex-basis: 100%; }
  .cc.cc-modal .cc-btn { flex: 1 1 calc(50% - 5px); }
  .cc.cc-modal .cc-btn[data-cc="save"] { flex-basis: 100%; order: -1; }   /* na telefonie na górze */
}
@media (max-width: 480px) {
  .cc { padding: 10px; }
  .cc-title { font-size: 1.3rem; }
  .cc-desc { font-size: .85rem; }
  .cc-main { gap: 12px; }
  .cc-icon { width: 36px; height: 36px; padding: 7px; }
  .cc-btn, .cc.cc-modal .cc-btn { flex-basis: 100%; }
  .cc.cc-modal { padding: 0; place-items: end center; }
  .cc.cc-modal .cc-box { max-height: 92vh; max-height: 92dvh; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .consent-embed { min-height: 260px; }
}
