/* RandomCount cookie banner (assets/js/cookie-consent.js).
   Desktop: floating bottom bar. Mobile: bottom sheet, max 40% of the screen.
   No overlay, so the page keeps scrolling and stays usable. */
#rc-cc {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 960px;
  max-height: 40vh;
  overflow-y: auto;
  z-index: 2147483000;
  box-sizing: border-box;
  padding: 18px 22px;
  background: #FFFDF8;
  color: #2B1F14;
  border: 1.5px solid #E0D8C5;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(43, 31, 20, .18);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: .92rem;
  line-height: 1.55;
}

#rc-cc[hidden],
#rc-cc [hidden] {
  display: none;
}

#rc-cc p {
  margin: 0 0 14px;
}

#rc-cc a {
  color: #9a4515;
  font-weight: 600;
  text-decoration: underline;
}

.rc-cc-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rc-cc-btn {
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  border: 2px solid #b5541c;
  border-radius: 100px;
  background: #b5541c;
  color: #fff;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.rc-cc-btn:hover {
  background: #fff;
  color: #9a4515;
}

#rc-cc a:focus-visible,
#rc-cc input:focus-visible,
.rc-cc-btn:focus-visible {
  outline: 3px solid #2B1F14;
  outline-offset: 2px;
}

#rc-cc-prefs {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px;
  background: #F7F2E8;
  border: 1px solid #E0D8C5;
  border-radius: 10px;
}

#rc-cc-prefs label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

#rc-cc-prefs input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: #b5541c;
}

#rc-cc-prefs input:disabled {
  cursor: not-allowed;
}

#rc-cc-prefs b {
  display: block;
  color: #4A3728;
}

#rc-cc-prefs .rc-cc-btn {
  justify-self: start;
  min-width: 160px;
}

@media (min-width: 768px) {
  #rc-cc-prefs {
    grid-template-columns: repeat(3, 1fr);
  }

  #rc-cc-prefs .rc-cc-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  #rc-cc {
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    font-size: .86rem;
  }

  .rc-cc-btns {
    gap: 8px;
  }

  .rc-cc-btn {
    padding: 8px 10px;
    font-size: .82rem;
  }

  #rc-cc-prefs .rc-cc-btn {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #rc-cc {
    animation: rc-cc-in .3s ease-out;
  }

  @keyframes rc-cc-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
