/* =========================================
   👮 LEGAL CONSENT MODAL
   ========================================= */

.legal-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px); /* Enhanced blur */
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: consentFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.legal-consent-modal {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  max-width: 550px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  animation: consentSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-consent-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: white;
  padding: 32px;
  border-radius: 24px 24px 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle shine effect on header */
.legal-consent-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  transform: rotate(30deg);
  pointer-events: none;
}

.legal-consent-header h2 {
  margin: 0 0 8px 0;
  font-size: 2em;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.02em;
}

.legal-consent-subtitle {
  margin: 0;
  opacity: 0.95;
  font-size: 1.05em;
  font-weight: 500;
}

.legal-consent-content {
  padding: 32px;
}

.legal-warning-box {
  background: #fff8e1; /* Softer yellow */
  border: 2px solid #ffc107;
  border-left: 6px solid #ffc107;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 4px 6px -1px rgba(255, 193, 7, 0.1);
}

.legal-warning-box p {
  margin: 0 0 8px 0;
  color: #856404;
  line-height: 1.6;
  font-size: 0.95em;
}

.legal-warning-box p:last-child {
  margin-bottom: 0;
}

.legal-documents-list {
  margin-bottom: 28px;
}

.legal-documents-list p {
  font-weight: 700;
  margin-bottom: 16px;
  color: #1f2937;
  font-size: 1.1em;
}

.legal-documents-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-documents-list li {
  padding: 16px;
  background: #f3f4f6;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.legal-documents-list li:hover {
  background: #f9fafb;
  transform: translateX(4px);
  border-color: #e5e7eb;
}

.legal-documents-list li a {
  color: #7c3aed; /* Violet-600 */
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-doc-desc {
  font-size: 0.9em;
  color: #6b7280;
  margin-left: 2px;
}

.legal-consent-checkbox {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 32px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.legal-consent-checkbox:hover {
  border-color: #d1d5db;
  background: #fff;
}

.legal-consent-checkbox.checked {
  border-color: #10b981;
  background: #ecfdf5;
}

.legal-consent-checkbox label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 14px;
}

/* Custom Checkbox */
.legal-consent-checkbox input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #9ca3af;
  border-radius: 6px;
  margin-top: 2px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.legal-consent-checkbox input[type='checkbox']::before {
  content: '';
  width: 14px;
  height: 14px;
  transform: scale(0);
  transition: 0.12s transform ease-in-out;
  box-shadow: inset 1em 1em white;
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.legal-consent-checkbox input[type='checkbox']:checked {
  background-color: #10b981;
  border-color: #10b981;
}

.legal-consent-checkbox input[type='checkbox']:checked::before {
  transform: scale(1);
}

.legal-consent-checkbox span {
  line-height: 1.5;
  color: #374151;
  font-size: 0.95em;
}

.legal-consent-checkbox a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
}

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

.legal-consent-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.legal-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 16px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Button Ripple Effect */
.legal-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}
.legal-btn:active::after {
  width: 200px;
  height: 200px;
}

.legal-btn-decline {
  background: #f3f4f6;
  color: #6b7280;
}

.legal-btn-decline:hover {
  background: #e5e7eb;
  color: #374151;
}

.legal-btn-accept {
  background: linear-gradient(135deg, #8b5cf6 0%, #10b981 100%);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
}

.legal-btn-accept:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.5);
}

.legal-btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #d1d5db;
  box-shadow: none;
  transform: none;
  color: #9ca3af;
}

.legal-consent-footnote {
  text-align: center;
  font-size: 0.85em;
  color: #9ca3af;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid #f3f4f6;
}

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

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

@keyframes consentSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .legal-consent-modal {
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    position: absolute;
    bottom: 0;
    transform: translateY(100%);
    animation: consentSlideUpMobile 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes consentSlideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .legal-consent-header {
    padding: 24px;
  }

  .legal-consent-header h2 {
    font-size: 1.6em;
  }

  .legal-consent-content {
    padding: 24px;
  }

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

  .legal-btn {
    width: 100%;
    padding: 18px;
  }
}
