/* ============================================
   POLICY MODAL
   ============================================ */

.policy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.policy-modal.active {
  display: flex;
}

.policy-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.policy-modal__container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #e8e9eb;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html[data-theme="dark"] .policy-modal__container {
  background: #1e293b;
}

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

.policy-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

html[data-theme="dark"] .policy-modal__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.policy-modal__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

html[data-theme="dark"] .policy-modal__title {
  color: #f5f5f7;
}

.policy-modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #6b7280;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.policy-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

html[data-theme="dark"] .policy-modal__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f7;
}

.policy-modal__content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 32px;
  position: relative;
  scrollbar-color: #a855f7 #e8e9eb;
  scrollbar-width: thin;
}

/* Custom Scrollbar */
.policy-modal__content::-webkit-scrollbar {
  width: 8px;
}

.policy-modal__content::-webkit-scrollbar-track {
  background: #e8e9eb;
}

.policy-modal__content::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 999px;
  border: 2px solid #e8e9eb;
}

.policy-modal__content::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

html[data-theme="dark"] .policy-modal__content::-webkit-scrollbar-thumb {
  background: #c084fc;
  border: 2px solid #1e293b;
}

html[data-theme="dark"] .policy-modal__content::-webkit-scrollbar-track {
  background: #1e293b;
}

html[data-theme="dark"] .policy-modal__content {
  scrollbar-color: #c084fc #1e293b;
}

/* Policy Content Styling */
.policy-modal__body h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 32px 0;
  letter-spacing: -0.01em;
}

html[data-theme="dark"] .policy-modal__body h1 {
  color: #f5f5f7;
}

.policy-modal__body h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 32px 0 16px 0;
}

html[data-theme="dark"] .policy-modal__body h2 {
  color: #e2e8f0;
}

.policy-modal__body p {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 16px 0;
}

html[data-theme="dark"] .policy-modal__body p {
  color: #94a3b8;
}

.policy-modal__body ul,
.policy-modal__body ol {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 16px 0;
  padding-left: 24px;
}

html[data-theme="dark"] .policy-modal__body ul,
html[data-theme="dark"] .policy-modal__body ol {
  color: #94a3b8;
}

.policy-modal__body li {
  margin-bottom: 8px;
}

.policy-modal__body strong {
  font-weight: 600;
  color: #1e293b;
}

html[data-theme="dark"] .policy-modal__body strong {
  color: #e2e8f0;
}

/* Info Block Styling */
.policy-info-block {
  background: rgba(168, 85, 247, 0.08);
  border-left: 3px solid #a855f7;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 8px;
}

html[data-theme="dark"] .policy-info-block {
  background: rgba(168, 85, 247, 0.12);
}

.policy-info-block p {
  margin: 4px 0;
  font-size: 14px;
}

/* Loading State */
.policy-modal__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6b7280;
}

.policy-modal__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .policy-modal__container {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .policy-modal__header {
    padding: 20px 24px;
  }

  .policy-modal__content {
    padding: 24px 20px;
  }

  .policy-modal__body h1 {
    font-size: 26px;
  }

  .policy-modal__body h2 {
    font-size: 18px;
  }
}
