/* Consent Banner Styles - Story 7.3 */
/* Matches style.css theme: #f8f9fa backgrounds, #dee2e6 borders, #2c3e50 header */

/* Modal container - fixed overlay */
.consent-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blocking backdrop */
.consent-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  pointer-events: all;
}

/* Dialog box */
.consent-dialog {
  position: relative;
  z-index: 10001;
  max-width: 600px;
  width: 90%;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-height: 85vh;
  overflow-y: auto;
}

/* Dialog title */
.consent-dialog h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #007bff;
}

/* Dialog paragraphs */
.consent-dialog p {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.consent-dialog ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: #495057;
}

.consent-dialog ul li {
  margin-bottom: 0.5rem;
}

.consent-dialog strong {
  color: #2c3e50;
}

.consent-note {
  font-size: 0.875rem;
  color: #6c757d;
  font-style: italic;
}

/* Button container */
.consent-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.consent-buttons-main {
  justify-content: center;
}

/* Button styles */
.consent-dialog button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.consent-dialog .btn-primary {
  background: #007bff;
  color: white;
}

.consent-dialog .btn-primary:hover {
  background: #0056b3;
}

.consent-dialog .btn-primary:focus {
  outline: 2px solid #0056b3;
  outline-offset: 2px;
}

.consent-dialog .btn-secondary {
  background: #6c757d;
  color: white;
}

.consent-dialog .btn-secondary:hover {
  background: #545b62;
}

.consent-dialog .btn-secondary:focus {
  outline: 2px solid #545b62;
  outline-offset: 2px;
}

.consent-dialog .btn-link {
  background: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.consent-dialog .btn-link:hover {
  background: #007bff;
  color: white;
}

.consent-dialog .btn-link:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Detailed settings panel */
.consent-details {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
}

.consent-details h3 {
  color: #2c3e50;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Consent option */
.consent-option {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.consent-option label {
  display: flex;
  align-items: start;
  cursor: pointer;
  gap: 0.75rem;
}

.consent-option input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.consent-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.consent-option-text {
  flex: 1;
}

.consent-option-text strong {
  color: #2c3e50;
  display: block;
  margin-bottom: 0.25rem;
}

.consent-option-text small {
  color: #6c757d;
  line-height: 1.4;
}

.consent-required {
  color: #007bff;
  font-weight: normal;
  font-size: 0.875rem;
}

/* Error message */
.consent-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
}

/* Disable body scroll when banner visible */
body.consent-banner-active {
  overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .consent-dialog {
    width: 95%;
    padding: 1.5rem;
    max-height: 90vh;
  }

  .consent-dialog h2 {
    font-size: 1.25rem;
  }

  .consent-buttons {
    flex-direction: column;
  }

  .consent-dialog button {
    width: 100%;
  }
}

/* Focus indicators for accessibility */
.consent-dialog button:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.consent-option input[type="checkbox"]:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Scrollbar styling for dialog */
.consent-dialog::-webkit-scrollbar {
  width: 8px;
}

.consent-dialog::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.consent-dialog::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 4px;
}

.consent-dialog::-webkit-scrollbar-thumb:hover {
  background: #c8ccd0;
}
