/* Mach41 cookie consent banner */
#mach41-cookie-consent {
  --cc-bg: #0a0f1a;
  --cc-border: rgba(55, 65, 81, 0.6);
  --cc-text: #d1d5db;
  --cc-muted: #9ca3af;
  --cc-brand: #3b8bff;
  --cc-brand-hover: #59b0ff;
  --cc-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(59, 139, 255, 0.08);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#mach41-cookie-consent *,
#mach41-cookie-consent *::before,
#mach41-cookie-consent *::after {
  box-sizing: border-box;
}

#mach41-cookie-consent .cc-banner,
#mach41-cookie-consent .cc-panel {
  position: fixed;
  z-index: 99999;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  box-shadow: var(--cc-shadow);
  color: var(--cc-text);
}

#mach41-cookie-consent .cc-banner {
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#mach41-cookie-consent.cc-visible .cc-banner {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#mach41-cookie-consent .cc-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

#mach41-cookie-consent .cc-text {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--cc-muted);
}

#mach41-cookie-consent .cc-text a {
  color: var(--cc-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#mach41-cookie-consent .cc-text a:hover {
  color: var(--cc-brand-hover);
}

#mach41-cookie-consent .cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#mach41-cookie-consent .cc-btn {
  appearance: none;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

#mach41-cookie-consent .cc-btn:focus-visible {
  outline: 2px solid var(--cc-brand);
  outline-offset: 2px;
}

#mach41-cookie-consent .cc-btn:active {
  transform: scale(0.98);
}

#mach41-cookie-consent .cc-btn-primary {
  background: linear-gradient(135deg, #3b8bff, #1e6bf5);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 139, 255, 0.25);
}

#mach41-cookie-consent .cc-btn-primary:hover {
  background: linear-gradient(135deg, #59b0ff, #3b8bff);
}

#mach41-cookie-consent .cc-btn-secondary {
  background: rgba(31, 41, 55, 0.8);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
}

#mach41-cookie-consent .cc-btn-secondary:hover {
  background: rgba(55, 65, 81, 0.6);
  color: #f9fafb;
}

#mach41-cookie-consent .cc-btn-ghost {
  background: transparent;
  color: var(--cc-muted);
  border: 1px solid transparent;
}

#mach41-cookie-consent .cc-btn-ghost:hover {
  color: #f9fafb;
}

#mach41-cookie-consent .cc-panel {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mach41-cookie-consent.cc-panel-open .cc-panel {
  opacity: 1;
  pointer-events: auto;
}

#mach41-cookie-consent .cc-panel-inner {
  width: 100%;
  max-width: 28rem;
  max-height: min(90vh, 32rem);
  overflow-y: auto;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  box-shadow: var(--cc-shadow);
  transform: translateY(0.5rem);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#mach41-cookie-consent.cc-panel-open .cc-panel-inner {
  transform: translateY(0);
}

#mach41-cookie-consent .cc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(55, 65, 81, 0.4);
}

#mach41-cookie-consent .cc-category:last-of-type {
  border-bottom: none;
}

#mach41-cookie-consent .cc-category h3 {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f3f4f6;
}

#mach41-cookie-consent .cc-category p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--cc-muted);
}

#mach41-cookie-consent .cc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  height: 1.375rem;
}

#mach41-cookie-consent .cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

#mach41-cookie-consent .cc-toggle input:disabled {
  cursor: not-allowed;
}

#mach41-cookie-consent .cc-toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #374151;
  transition: background-color 0.2s ease;
}

#mach41-cookie-consent .cc-toggle-thumb {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

#mach41-cookie-consent .cc-toggle input:checked + .cc-toggle-track {
  background: var(--cc-brand);
}

#mach41-cookie-consent .cc-toggle input:checked ~ .cc-toggle-thumb {
  transform: translateX(1.125rem);
}

#mach41-cookie-consent .cc-toggle input:disabled + .cc-toggle-track {
  opacity: 0.55;
}

#mach41-cookie-consent .cc-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

#mach41-cookie-consent .cc-settings-btn {
  position: fixed;
  z-index: 99998;
  left: 1rem;
  bottom: 1rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--cc-border);
  background: var(--cc-bg);
  color: var(--cc-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

#mach41-cookie-consent.cc-settings-visible .cc-settings-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#mach41-cookie-consent .cc-settings-btn:hover {
  color: #f9fafb;
  border-color: rgba(59, 139, 255, 0.4);
}

#mach41-cookie-consent .cc-settings-btn:focus-visible {
  outline: 2px solid var(--cc-brand);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  #mach41-cookie-consent .cc-banner {
    left: 1.5rem;
    right: auto;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mach41-cookie-consent .cc-banner,
  #mach41-cookie-consent .cc-panel,
  #mach41-cookie-consent .cc-panel-inner,
  #mach41-cookie-consent .cc-settings-btn,
  #mach41-cookie-consent .cc-btn,
  #mach41-cookie-consent .cc-toggle-thumb,
  #mach41-cookie-consent .cc-toggle-track {
    transition: none;
  }
}
