/* OmWeb.dk - Cookie Consent Banner */

.cookie-consent-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-consent-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.cookie-consent {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 24px));
  max-width: 60%;
  width: calc(100% - 32px);
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10002;
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border: 1px solid #e5e7eb;
  opacity: 0;
  pointer-events: none;
}

.cookie-consent.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.cookie-consent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.cookie-consent-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0b1220;
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.cookie-consent-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  font-weight: bold;
  line-height: 1;
}

.cookie-consent-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #0b1220;
}

.cookie-consent-close:active {
  background: rgba(0, 0, 0, 0.15);
}

.cookie-consent-content {
  margin-bottom: 12px;
  color: #475569;
  line-height: 1.4;
  font-size: 0.75rem;
}

.cookie-consent-content p {
  margin: 0 0 8px 0;
}

.cookie-consent-content a {
  color: #4f46e5;
  text-decoration: underline;
}

.cookie-consent-content a:hover {
  color: #7c3aed;
}

.cookie-consent-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cookie-consent-tab {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s ease;
}

.cookie-consent-tab:hover {
  color: #4f46e5;
}

.cookie-consent-tab.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.cookie-consent-categories {
  margin-bottom: 16px;
}

.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid #e5e7eb;
}

.cookie-category-info {
  flex: 1;
}

.cookie-category-name {
  font-weight: 600;
  color: #0b1220;
  margin-bottom: 2px;
  font-size: 0.8125rem;
}

.cookie-category-desc {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.3;
}

.cookie-category-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-category-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-category-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-category-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-category-toggle input:checked + .cookie-category-toggle-slider {
  background-color: #4f46e5;
}

.cookie-category-toggle input:checked + .cookie-category-toggle-slider:before {
  transform: translateX(20px);
}

.cookie-category-toggle input:disabled + .cookie-category-toggle-slider {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-consent-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cookie-consent-btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  flex: 1;
  min-width: 80px;
}

.cookie-consent-btn-reject {
  background: #f1f5f9;
  color: #475569;
}

.cookie-consent-btn-reject:hover {
  background: #e2e8f0;
}

.cookie-consent-btn-selected {
  background: #4f46e5;
  color: white;
}

.cookie-consent-btn-selected:hover {
  background: #4338ca;
}

.cookie-consent-btn-all {
  background: #0b1220;
  color: white;
}

.cookie-consent-btn-all:hover {
  background: #1e293b;
}

/* Mobile */
@media (max-width: 640px) {
  .cookie-consent {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    transform: translateY(calc(100% + 16px));
    padding: 14px;
    max-height: 80vh;
    border-radius: 10px;
  }

  .cookie-consent.show {
    transform: translateY(0);
  }

  .cookie-consent-close {
    width: 32px;
    height: 32px;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.08);
  }

  .cookie-consent-header {
    flex-direction: column;
    gap: 6px;
  }

  .cookie-consent-title {
    font-size: 0.875rem;
  }

  .cookie-consent-content {
    font-size: 0.6875rem;
  }

  .cookie-consent-tabs {
    gap: 2px;
  }

  .cookie-consent-tab {
    padding: 6px 10px;
    font-size: 0.6875rem;
  }

  .cookie-category {
    padding: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cookie-category-name {
    font-size: 0.75rem;
  }

  .cookie-category-desc {
    font-size: 0.625rem;
  }

  .cookie-category-toggle {
    align-self: flex-end;
  }

  .cookie-consent-actions {
    flex-direction: column;
    gap: 6px;
  }

  .cookie-consent-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.6875rem;
  }
}
