:root {
  --cc-bg: #ffffff;
  --cc-primary: #3aa0db;
  --cc-primary-hover: #1d5a8f;
  --cc-primary-light: #e8f0f8;
  --cc-text: #1a1a1a;
  --cc-text-secondary: #666666;
  --cc-border: #d4d4d4;
  --cc-overlay: rgba(0, 0, 0, 0.45);
  --cc-toggle-bg: #c0c0c0;
  --cc-toggle-active: #3aa0db;
  --cc-toggle-disabled: #a0a0a0;
  --cc-shadow: 0 -6px 30px rgba(0, 0, 0, 0.12);
  --cc-radius: 12px;
  --cc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cc-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--cc-bg);
  box-shadow: var(--cc-shadow);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--cc-font);
  color: var(--cc-text);
  font-size: 14px;
  line-height: 1.5;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-consent.active {
  transform: translateY(0);
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
}

.cookie-consent-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cookie-consent-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cc-text);
  margin: 0;
}

.cookie-consent-text {
  color: var(--cc-text-secondary);
  font-size: 14px;
  margin: 0 0 16px;
  max-width: 860px;
}

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

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

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cookie-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: var(--cc-font);
  white-space: nowrap;
}

.cookie-consent-btn-primary {
  background: var(--cc-primary);
  color: #fff;
  border-color: var(--cc-primary);
}

.cookie-consent-btn-primary:hover {
  background: var(--cc-primary-hover);
  border-color: var(--cc-primary-hover);
}

.cookie-consent-btn-secondary {
  background: transparent;
  color: var(--cc-text-secondary);
  border-color: var(--cc-border);
}

.cookie-consent-btn-secondary:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.cookie-consent-btn-link {
  background: transparent;
  color: var(--cc-primary);
  border-color: transparent;
  padding: 10px 16px;
  font-weight: 500;
}

.cookie-consent-btn-link:hover {
  background: var(--cc-primary-light);
}

.cookie-consent-details {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--cc-border);
  display: none;
}

.cookie-consent-details.open {
  display: block;
}

.cookie-consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 16px;
}

.cookie-consent-category:last-child {
  border-bottom: none;
}

.cookie-consent-category-info {
  flex: 1;
  min-width: 0;
}

.cookie-consent-category-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--cc-text);
  margin: 0 0 2px;
}

.cookie-consent-category-desc {
  font-size: 13px;
  color: var(--cc-text-secondary);
  margin: 0;
}

.cookie-consent-toggle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  margin-left: auto;
}

.cookie-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-consent-toggle .toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--cc-toggle-bg);
  border-radius: 26px;
  transition: background 0.25s;
}

.cookie-consent-toggle .toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-consent-toggle input:checked + .toggle-slider {
  background: var(--cc-toggle-active);
}

.cookie-consent-toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.cookie-consent-toggle input:disabled + .toggle-slider {
  background: var(--cc-toggle-disabled);
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-consent-toggle input:disabled + .toggle-slider::before {
  transform: translateX(22px);
}

@media (max-width: 768px) {
  .cookie-consent-inner {
    padding: 20px 16px;
  }

  .cookie-consent-actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-consent-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }

  .cookie-consent-category {
    flex-wrap: wrap;
    gap: 8px;
  }

  .cookie-consent-category-info {
    flex: 1 1 calc(100% - 60px);
  }

  .cookie-consent-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .cookie-consent-inner {
    padding: 16px 12px;
  }

  .cookie-consent-text {
    font-size: 13px;
  }
}
