/* Consent Management Platform Styles */
.cmp-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cmp-modal.active {
  opacity: 1;
  visibility: visible;
}

.cmp-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.cmp-header {
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cmp-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.cmp-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.cmp-close:hover {
  background: #f1f5f9;
}

.cmp-body {
  padding: 24px;
}

.cmp-section {
  margin-bottom: 24px;
}

.cmp-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1e293b;
}

.cmp-purposes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cmp-purpose-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cmp-purpose-info {
  flex: 1;
}

.cmp-purpose-name {
  font-weight: 500;
  color: #334155;
  margin-bottom: 4px;
}

.cmp-purpose-desc {
  font-size: 0.875rem;
  color: #64748b;
}

.cmp-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.cmp-toggle.active {
  background: #2563eb;
}

.cmp-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cmp-toggle.active::after {
  transform: translateX(20px);
}

.cmp-actions {
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cmp-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-size: 0.875rem;
}

.cmp-btn-primary {
  background: #2563eb;
  color: white;
}

.cmp-btn-primary:hover {
  background: #1d4ed8;
}

.cmp-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.cmp-btn-secondary:hover {
  background: #e2e8f0;
}

.cmp-btn-danger {
  background: #dc2626;
  color: white;
}

.cmp-btn-danger:hover {
  background: #b91c1c;
}

.cmp-vendor-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.cmp-vendor-item {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.cmp-vendor-item:last-child {
  border-bottom: none;
}

.us-privacy-notice {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.us-privacy-notice h4 {
  color: #92400e;
  margin-bottom: 8px;
}

.us-privacy-notice p {
  color: #78350f;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cmp-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .cmp-header,
  .cmp-body,
  .cmp-actions {
    padding: 16px;
  }
  
  .cmp-actions {
    flex-direction: column;
  }
  
  .cmp-btn {
    width: 100%;
    justify-content: center;
  }
  
  .cmp-purpose-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .cmp-toggle {
    align-self: flex-end;
  }
}

/* Focus States for Accessibility */
.cmp-btn:focus,
.cmp-toggle:focus,
.cmp-close:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .cmp-modal-content {
    border: 2px solid #000;
  }
  
  .cmp-toggle {
    border: 2px solid #000;
  }
  
  .cmp-btn {
    border: 2px solid currentColor;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .cmp-modal,
  .cmp-toggle,
  .cmp-btn {
    transition: none;
  }
}