/* WPF Consent Manager CSS */

/* Consent banner — fixed bottom */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 20px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  display: none;
}
.consent-banner.active {
  display: block;
}
.consent-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-banner-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text, #1a202c);
  line-height: 1.5;
}
.consent-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.consent-banner-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.consent-banner-actions button:active {
  transform: scale(0.97);
}
.consent-btn-accept {
  background: var(--blue, #2563eb);
  color: #fff;
}
.consent-btn-accept:hover {
  background: #1d4ed8;
}
.consent-btn-reject {
  background: var(--border, #d1d5db);
  color: var(--text, #1a202c);
}
.consent-btn-reject:hover {
  background: #b0b5bd;
}
.consent-btn-customize {
  background: transparent;
  color: var(--blue, #2563eb);
  border: 1px solid var(--blue, #2563eb) !important;
}
.consent-btn-customize:hover {
  background: rgba(37,99,235,0.05);
}

/* Consent preferences modal */
.consent-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.consent-modal-overlay.active {
  display: flex;
}
.consent-modal {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.consent-modal h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}
.consent-modal p {
  font-size: 0.85rem;
  color: var(--muted, #374151);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* Consent category toggle */
.consent-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.consent-category:last-child {
  border-bottom: none;
}
.consent-category-info {
  flex: 1;
}
.consent-category-info strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.consent-category-info span {
  font-size: 0.8rem;
  color: var(--muted, #374151);
  line-height: 1.4;
}

/* iOS-style toggle switch */
.consent-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.consent-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border, #d1d5db);
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s;
}
.consent-toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.consent-toggle input:checked + .consent-toggle-slider {
  background: var(--blue, #2563eb);
}
.consent-toggle input:checked + .consent-toggle-slider::before {
  transform: translateX(20px);
}
.consent-toggle input:disabled + .consent-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.consent-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* Dark mode support */
[data-theme="dark"] .consent-banner {
  background: rgba(30,30,30,0.95);
  border-top-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .consent-modal {
  background: var(--card-bg, #1e1e1e);
}
[data-theme="dark"] .consent-btn-reject {
  background: #374151;
  color: #e5e7eb;
}

/* Responsive */
@media (max-width: 640px) {
  .consent-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .consent-banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .consent-banner-actions button {
    width: 100%;
  }
  .consent-modal {
    padding: 20px;
  }
}
