/* ===== OpenSeoLab — Legal Modal Stylesheet ===== */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.legal-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.legal-modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: #0f0f1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(124, 58, 237, 0.15);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal-backdrop.is-open .legal-modal-container {
  transform: translateY(0) scale(1);
}

/* Header */
.legal-modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.legal-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legal-modal-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.legal-modal-title-group h3 {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.legal-modal-title-group p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.legal-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-modal-btn-action {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.legal-modal-btn-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.legal-modal-btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.legal-modal-btn-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  transform: rotate(90deg);
}

/* Nav Tabs */
.legal-modal-nav {
  display: flex;
  padding: 10px 24px;
  gap: 8px;
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: thin;
}

.legal-modal-nav::-webkit-scrollbar {
  height: 4px;
}
.legal-modal-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.legal-nav-tab {
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.legal-nav-tab.active {
  color: #00f2fe;
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.15);
}

/* Body / Content Area */
.legal-modal-body {
  padding: 32px 36px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.75;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.legal-modal-body::-webkit-scrollbar {
  width: 8px;
}
.legal-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

/* Tab Panels */
.legal-tab-pane {
  display: none;
}
.legal-tab-pane.active {
  display: block;
  animation: legalFadeIn 0.25s ease-out;
}

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

/* Content Typography */
.legal-doc-title {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.legal-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #94a3b8;
}

.legal-doc-meta-item strong {
  color: #e2e8f0;
}

.legal-callout {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-left: 4px solid #7c3aed;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0 28px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.legal-callout--cyan {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.25);
  border-left: 4px solid #06b6d4;
}

.legal-callout h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.legal-modal-body h2 {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-modal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 22px 0 10px;
}

.legal-modal-body p {
  margin-bottom: 14px;
}

.legal-modal-body ul, .legal-modal-body ol {
  margin: 0 0 18px 22px;
}

.legal-modal-body li {
  margin-bottom: 8px;
}

.legal-modal-body strong {
  color: #f1f5f9;
}

.legal-table-wrapper {
  overflow-x: auto;
  margin: 20px 0 26px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 15, 0.4);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.legal-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table code {
  font-family: monospace;
  font-size: 0.82rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #00f2fe;
}

/* Footer of modal */
.legal-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-modal-footer-info {
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .legal-modal-container {
    max-height: 94vh;
    border-radius: 14px;
  }
  .legal-modal-header {
    padding: 16px 20px 14px;
  }
  .legal-modal-body {
    padding: 20px 20px;
  }
  .legal-modal-footer {
    padding: 14px 20px;
    flex-direction: column;
    text-align: center;
  }
  .legal-doc-title {
    font-size: 1.45rem;
  }
}
