/* Cookie consent banner — kamilslawinski.com */
/* Force-show system cursor whenever banner/modal is open
 * (the host site sets `body { cursor: none }` for its custom cursor;
 *  we override it with !important + targeting body itself).
 * Two strategies for browser-wide compatibility:
 *  - body:has(...) for modern browsers
 *  - body.cc-open class added by consent.js as fallback */
body:has(.cc-banner),
body:has(.cc-modal-visible),
body.cc-open { cursor: default !important; }
body.cc-open .cursor { display: none !important; } /* hide site's custom dot */

.cc-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: #141414;
  border: 1px solid rgba(237, 237, 232, 0.12);
  border-radius: 12px;
  padding: 24px;
  z-index: 100001;
  cursor: default !important;
  font-family: 'JetBrains Mono', monospace;
  color: #EDEDE8;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}
.cc-banner.cc-visible {
  transform: translateY(0);
  opacity: 1;
}
.cc-title {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #EDEDE8;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.cc-text {
  font-size: 12px;
  line-height: 1.55;
  color: #8A8A85;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}
.cc-text a {
  color: #FF5B1F;
  text-decoration: underline;
  text-decoration-color: rgba(255, 91, 31, 0.4);
  text-underline-offset: 3px;
}
.cc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cc-btn-accept {
  background: #FF5B1F;
  color: #0A0A0A;
  border-color: #FF5B1F;
}
.cc-btn-accept:hover { background: #ff6f3a; }
.cc-btn-reject {
  background: transparent;
  color: #EDEDE8;
  border-color: rgba(237, 237, 232, 0.2);
}
.cc-btn-reject:hover { border-color: #EDEDE8; }
.cc-btn-settings {
  background: transparent;
  color: #8A8A85;
  border-color: transparent;
  flex: 0 1 auto;
}
.cc-btn-settings:hover { color: #EDEDE8; }

/* Modal */
.cc-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: default !important;
}
.cc-banner *, .cc-modal *, .cc-modal-inner * { cursor: default !important; }
.cc-btn,
.cc-toggle,
.cc-toggle *,
.cc-text a,
label.cc-toggle,
.cc-modal a { cursor: pointer !important; }
.cc-toggle input:disabled,
.cc-toggle input:disabled + .cc-toggle-slider { cursor: not-allowed !important; }
.cc-cat-name, .cc-cat-desc, .cc-title, .cc-text, .cc-modal-title, .cc-modal-subtitle { cursor: default !important; }
.cc-modal.cc-modal-visible {
  display: flex;
  opacity: 1;
}
.cc-modal-inner {
  background: #141414;
  border: 1px solid rgba(237, 237, 232, 0.12);
  border-radius: 12px;
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  color: #EDEDE8;
}
.cc-modal-title {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #EDEDE8;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.cc-modal-subtitle {
  font-size: 12px;
  color: #8A8A85;
  margin: 0 0 24px;
  line-height: 1.5;
}
.cc-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(237, 237, 232, 0.08);
}
.cc-cat:last-of-type { border-bottom: 1px solid rgba(237, 237, 232, 0.08); margin-bottom: 24px; }
.cc-cat-name {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #EDEDE8;
  margin-bottom: 4px;
}
.cc-cat-desc {
  font-size: 11px;
  color: #8A8A85;
  line-height: 1.5;
}
.cc-toggle {
  position: relative;
  width: 36px;
  height: 22px;
  flex: 0 0 auto;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #4A4A47;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cc-toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #EDEDE8;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.cc-toggle input:checked + .cc-toggle-slider {
  background: #FF5B1F;
}
.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(14px);
}
.cc-toggle input:disabled + .cc-toggle-slider {
  background: #4A4A47;
  opacity: 0.5;
  cursor: not-allowed;
}
.cc-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .cc-banner { padding: 20px; bottom: 12px; left: 12px; right: 12px; }
  .cc-modal-inner { padding: 24px; }
  .cc-actions { flex-direction: column; }
  .cc-btn-settings { flex: 1; }
  .cc-modal-actions { flex-direction: column; }
}
