/**
 * ============================================
 * Legal Modal - CSS
 * ============================================
 * Modal למדיניות פרטיות ותנאי שימוש
 */

/* ============================================
   Modal Overlay
   ============================================ */
.legal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;

  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: all 0.3s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Active state */
.legal-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ============================================
   Modal Container
   ============================================ */
.legal-modal {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;

  background: var(--bg-card, #1A1F2E);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);

  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Active state */
.legal-modal-overlay.active .legal-modal {
  transform: scale(1) translateY(0);
}

/* ============================================
   Modal Header
   ============================================ */
.legal-modal-header {
  position: relative;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(10, 37, 64, 0.2));
  border-bottom: 1px solid rgba(192, 192, 192, 0.2);
  flex-shrink: 0;
}

.legal-modal-title {
  font-family: var(--font-family-heading, 'Heebo', sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #FAFAF9);
  margin: 0;
  padding-right: 40px;
}

.legal-modal-subtitle {
  font-family: var(--font-family-body, 'Assistant', sans-serif);
  font-size: 0.875rem;
  color: var(--text-muted, #A8A9AD);
  margin: 0.5rem 0 0 0;
}

/* Close button */
.legal-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;

  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.2);
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--text-secondary, #C0C0C0);
  font-size: 1.5rem;

  transition: all 0.3s ease;
}

.legal-modal-close:hover {
  background: rgba(192, 192, 192, 0.2);
  color: var(--text-primary, #FAFAF9);
  transform: rotate(90deg);
}

.legal-modal-close:focus {
  outline: 3px solid var(--royal-blue, #2C5F8D);
  outline-offset: 2px;
}

/* ============================================
   Modal Body
   ============================================ */
.legal-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

/* Custom scrollbar */
.legal-modal-body::-webkit-scrollbar {
  width: 8px;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: rgba(192, 192, 192, 0.1);
  border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: rgba(192, 192, 192, 0.3);
  border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 192, 192, 0.5);
}

/* Content styling */
.legal-content {
  font-family: var(--font-family-body, 'Assistant', sans-serif);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary, #FAFAF9);
}

.legal-content h2 {
  font-family: var(--font-family-heading, 'Heebo', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-silver, #C0C0C0);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(192, 192, 192, 0.2);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-family: var(--font-family-heading, 'Heebo', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary, #C0C0C0);
  margin: 1.5rem 0 0.75rem 0;
}

.legal-content p {
  margin: 0 0 1rem 0;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 1rem 0;
  padding-right: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content strong {
  color: var(--gold-champagne, #C9A961);
  font-weight: 600;
}

.legal-content a {
  color: var(--royal-blue, #2C5F8D);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--primary-silver, #C0C0C0);
}

/* Highlight box */
.legal-highlight {
  background: rgba(201, 169, 97, 0.1);
  border-right: 4px solid var(--gold-champagne, #C9A961);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* ============================================
   Modal Footer
   ============================================ */
.legal-modal-footer {
  padding: 1.5rem 2rem;
  background: rgba(192, 192, 192, 0.05);
  border-top: 1px solid rgba(192, 192, 192, 0.2);
  flex-shrink: 0;
  text-align: center;
}

.legal-modal-footer p {
  font-family: var(--font-family-body, 'Assistant', sans-serif);
  font-size: 0.875rem;
  color: var(--text-muted, #A8A9AD);
  margin: 0;
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
  .legal-modal {
    max-height: 100vh;
    border-radius: 0;
    max-width: 100%;
  }

  .legal-modal-header,
  .legal-modal-body,
  .legal-modal-footer {
    padding: 1.5rem;
  }

  .legal-modal-title {
    font-size: 1.5rem;
    padding-right: 50px;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }

  .legal-content h3 {
    font-size: 1.125rem;
  }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
  .legal-modal-overlay {
    display: none;
  }
}
