:root {
  --cc-font-family: 'Inter', sans-serif;
  --cc-body-color: #f8fafc;
  --cc-muted-color: rgba(148, 163, 184, 0.85);
  --cc-primary-color: #4f9ef8;
  --cc-primary-hover: #1f6feb;
  --cc-surface-color: rgba(15, 23, 42, 0.92);
  --cc-surface-elevated: rgba(18, 23, 38, 0.85);
  --cc-border-color: rgba(148, 163, 184, 0.18);
  --cc-shadow: 0 30px 80px rgba(8, 15, 35, 0.55);
  --cc-border-radius: 18px;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 9999;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(420px, calc(100% - 3rem));
  padding: 1.75rem;
  border-radius: var(--cc-border-radius);
  background: var(--cc-surface-color);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--cc-border-color);
  box-shadow: var(--cc-shadow);
  color: var(--cc-body-color);
  font-family: var(--cc-font-family);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-consent-banner__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.cookie-consent-banner__description {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--cc-muted-color);
}

.cookie-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-consent-button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  color: var(--cc-body-color);
}

.cookie-consent-button:focus-visible {
  outline: 3px solid rgba(79, 158, 248, 0.35);
  outline-offset: 3px;
}

.cookie-consent-button--primary {
  background: linear-gradient(135deg, var(--cc-primary-color), var(--cc-primary-hover));
  color: #020617;
  box-shadow: 0 18px 32px rgba(31, 111, 235, 0.32);
}

.cookie-consent-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(79, 158, 248, 0.4);
}

.cookie-consent-button--secondary {
  background: transparent;
  border: 1px solid rgba(79, 158, 248, 0.45);
  color: var(--cc-body-color);
}

.cookie-consent-button--secondary:hover {
  background: rgba(79, 158, 248, 0.12);
}

.cookie-consent-preferences-link {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--cc-primary-color);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cookie-consent-preferences-link:hover {
  color: var(--cc-primary-hover);
}

.cookie-consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.cookie-consent-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.cookie-consent-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10000;
  background: var(--cc-surface-color);
  padding: 2.5rem 2.25rem;
  width: min(640px, calc(100% - 3rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border-radius: 24px;
  border: 1px solid var(--cc-border-color);
  box-shadow: var(--cc-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--cc-body-color);
  font-family: var(--cc-font-family);
}

.cookie-consent-modal.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-consent-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cookie-consent-modal__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.cookie-consent-modal__close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--cc-muted-color);
  font-size: 1.25rem;
}

.cookie-consent-modal__close:hover {
  color: var(--cc-primary-color);
}

.cookie-consent-block {
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--cc-surface-elevated);
  border: 1px solid var(--cc-border-color);
  margin-bottom: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.cookie-consent-block__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.cookie-consent-block__description {
  margin: 0;
  color: var(--cc-muted-color);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-consent-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent-toggle input[type='checkbox'] {
  appearance: none;
  width: 2.75rem;
  height: 1.5rem;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
}

.cookie-consent-toggle input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease;
}

.cookie-consent-toggle input[type='checkbox']:checked {
  background: linear-gradient(135deg, var(--cc-primary-color), var(--cc-primary-hover));
}

.cookie-consent-toggle input[type='checkbox']:checked::after {
  transform: translateX(1.2rem);
}

.cookie-consent-toggle input[type='checkbox']:disabled {
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.12);
}

.cookie-consent-toggle input[type='checkbox']:disabled::after {
  box-shadow: none;
}

.cookie-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .cookie-consent-banner {
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .cookie-consent-modal {
    padding: 2rem 1.5rem;
    width: calc(100% - 2rem);
  }
}
