/* CoinWhales — الشروط والسياسات */

.terms-gate-locked .container,
.onboarding-gate-locked .container {
  pointer-events: none;
  user-select: none;
}

.terms-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 14, 0.92);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.terms-consent-overlay.hidden {
  display: none;
}

.terms-consent-card {
  width: min(100%, 400px);
  padding: 24px 20px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(165deg, #1a1040 0%, #0b1224 52%, #030508 100%);
  border: 2px solid rgba(192, 132, 252, 0.55);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(168, 85, 247, 0.25);
}

.terms-consent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  font-size: 28px;
  background: linear-gradient(145deg, rgba(245, 196, 81, 0.25), rgba(124, 58, 237, 0.35));
  border: 1px solid rgba(245, 196, 81, 0.45);
}

.terms-consent-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #faf5ff;
}

.terms-consent-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #c4b5fd;
}

.terms-consent-bonus-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(245, 196, 81, 0.35);
}

.onboarding-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 13100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 14, 0.92);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.onboarding-intro-overlay.hidden {
  display: none;
}

.onboarding-intro-card {
  width: min(100%, 420px);
  max-height: min(88vh, 640px);
  overflow-y: auto;
  padding: 24px 20px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(165deg, #1a1040 0%, #0b1224 52%, #030508 100%);
  border: 2px solid rgba(192, 132, 252, 0.55);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(168, 85, 247, 0.25);
}

.onboarding-intro-badge {
  font-size: 40px;
  margin-bottom: 8px;
}

.onboarding-intro-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #faf5ff;
}

.onboarding-intro-bonus {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  color: #fde68a;
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(245, 196, 81, 0.45);
}

.onboarding-intro-text {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #c4b5fd;
  text-align: right;
  white-space: pre-line;
}

.onboarding-intro-close {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #0b1224;
  cursor: pointer;
  background: linear-gradient(135deg, #f5c451 0%, #d4a017 100%);
  box-shadow: 0 8px 24px rgba(245, 196, 81, 0.35);
}

.onboarding-intro-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 12px;
  color: #fca5a5;
}

.terms-consent-link {
  display: inline-block;
  margin-bottom: 18px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #f5c451;
  text-decoration: underline;
  cursor: pointer;
}

.terms-consent-accept {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #0a0a0f;
  cursor: pointer;
  background: linear-gradient(180deg, #f5c451 0%, #d4a017 55%, #b8860b 100%);
  box-shadow: 0 8px 24px rgba(245, 196, 81, 0.35);
}

.terms-consent-accept:disabled {
  opacity: 0.55;
  cursor: wait;
}

.terms-consent-status {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: #f87171;
}

/* عارض المستندات */

.legal-doc-dialog {
  margin: auto;
  padding: 0;
  width: min(100vw - 16px, 480px);
  max-height: min(92vh, 720px);
  border: none;
  border-radius: 20px;
  background: transparent;
  overflow: hidden;
}

.legal-doc-dialog::backdrop {
  background: rgba(3, 6, 14, 0.88);
  backdrop-filter: blur(6px);
}

.legal-doc-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 720px);
  background: linear-gradient(180deg, #12182b 0%, #080d18 100%);
  border: 2px solid rgba(192, 132, 252, 0.4);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.legal-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: linear-gradient(90deg, rgba(30, 17, 69, 0.6), rgba(15, 22, 40, 0.9));
}

.legal-doc-head-text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.legal-doc-head-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.legal-doc-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #faf5ff;
}

.legal-doc-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 22, 40, 0.9);
  color: #e2e8f0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.legal-doc-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px 20px;
}

.legal-doc-section + .legal-doc-section {
  margin-top: 18px;
}

.legal-doc-section h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #f5c451;
}

.legal-doc-section p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
  color: #cbd5e1;
}

.legal-doc-section ul {
  margin: 0 0 10px;
  padding: 0 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #94a3b8;
}

.legal-doc-section li + li {
  margin-top: 6px;
}

/* إعدادات — الشروط والسياسات */

.psd-legal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.psd-legal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(30, 17, 69, 0.45), rgba(15, 22, 40, 0.85));
  font-family: inherit;
  cursor: pointer;
  text-align: start;
}

.psd-legal-link:active {
  transform: scale(0.99);
}

.psd-legal-link-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.psd-legal-link-copy {
  flex: 1;
  min-width: 0;
}

.psd-legal-link-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
}

.psd-legal-link-chevron {
  font-size: 18px;
  color: #a78bfa;
  flex-shrink: 0;
}

.psd-meta-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(11, 18, 36, 0.85);
}

.psd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.psd-meta-label {
  color: #94a3b8;
  font-weight: 600;
}

.psd-meta-value {
  color: #e2e8f0;
  font-weight: 800;
}

.psd-support-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 196, 81, 0.45);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.2), rgba(124, 58, 237, 0.25));
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
  cursor: pointer;
}

.psd-terms-accepted-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.psd-terms-accepted-hint.hidden {
  display: none;
}

.legal-doc-loading,
.legal-doc-error {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.legal-doc-error {
  color: #f87171;
}
