/* HUMIT Consent Modal Styles */

/* Overlay */
.consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99998;
  animation: fadeIn 0.3s ease-in-out;
}

/* Modal Dialog */
.consent-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

/* Content */
.consent-content {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
}

.consent-content h2 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.consent-intro {
  margin-bottom: 25px;
  color: #555;
  line-height: 1.6;
}

/* Options */
.consent-options {
  margin-bottom: 25px;
}

.consent-option {
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  background: #f9f9f9;
}

.consent-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.consent-option-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.consent-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.consent-badge.required {
  background: #e8f5e9;
  color: #2e7d32;
}

.consent-option-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.consent-option-description p {
  margin: 0 0 10px 0;
}

.consent-option-description ul {
  margin: 10px 0;
  padding-left: 20px;
}

.consent-option-description li {
  margin-bottom: 8px;
  font-size: 13px;
}

.consent-option-description details {
  margin-top: 10px;
}

.consent-option-description summary {
  cursor: pointer;
  color: #1976d2;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
}

.consent-option-description summary:hover {
  text-decoration: underline;
}

/* Toggle Switch */
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.consent-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.consent-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.consent-toggle input:checked + .consent-toggle-slider {
  background-color: #2196F3;
}

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

/* Buttons */
.consent-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.consent-btn {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.consent-accept-all {
  background: #2196F3;
  color: white;
}

.consent-accept-all:hover {
  background: #1976D2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.consent-btn.secondary {
  background: #fff;
  color: #333;
  border: 2px solid #ddd;
}

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

.consent-btn.tertiary {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.consent-btn.tertiary:hover {
  background: #f9f9f9;
  color: #333;
}

/* Footer */
.consent-footer {
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #777;
  text-align: center;
}

.consent-footer a {
  color: #1976d2;
  text-decoration: none;
}

.consent-footer a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Closing animation */
#humit-consent-modal.consent-closing .consent-overlay {
  animation: fadeOut 0.3s ease-in-out forwards;
}

#humit-consent-modal.consent-closing .consent-dialog {
  animation: slideDown 0.3s ease-in forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .consent-dialog {
    width: 95%;
    max-height: 95vh;
  }

  .consent-content {
    padding: 20px;
  }

  .consent-content h2 {
    font-size: 20px;
  }

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

  .consent-btn {
    min-width: 100%;
  }
}

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

.consent-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.consent-content::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.consent-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}
