/**
 * Auth Wall Styles - Welcome screen for unauthenticated users
 * Shows a full-screen overlay with logo and login/subscription options
 */

/* When auth wall is active, hide page content and prevent scrolling */
html.auth-wall-active {
  overflow: hidden !important;
}

html.auth-wall-active body {
  overflow: hidden !important;
}

html.auth-wall-active body > *:not(#auth-wall):not(script):not(style):not(link) {
  pointer-events: none !important;
}

/* Auth wall overlay */
#auth-wall {
  position: fixed;
  inset: 0;
  z-index: 100000;
  /* Semi-transparent dark overlay to show portal behind */
  background: rgba(26, 54, 93, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#auth-wall.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Auth wall content container */
.auth-wall-content {
  text-align: center;
  max-width: 480px;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  margin: 20px;
  animation: authWallSlideIn 0.5s ease-out;
}

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

/* Logo styling */
.auth-wall-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 24px;
}

/* Welcome title */
.auth-wall-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 12px;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

/* Subtitle/description */
.auth-wall-subtitle {
  font-size: 16px;
  color: #4a5568;
  margin-bottom: 32px;
  line-height: 1.7;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

/* Buttons container */
.auth-wall-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

/* Primary button (Login) */
.auth-wall-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Cairo', 'Rubik', sans-serif;
  box-shadow: 0 4px 15px rgba(49, 130, 206, 0.4);
}

.auth-wall-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(49, 130, 206, 0.5);
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: #fff;
  text-decoration: none;
}

.auth-wall-btn-primary:active {
  transform: translateY(0);
}

/* Secondary button (Register/Subscribe) */
.auth-wall-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 17px;
  font-weight: 600;
  color: #2c5282;
  background: transparent;
  border: 2px solid #3182ce;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

.auth-wall-btn-secondary:hover {
  background: rgba(49, 130, 206, 0.08);
  border-color: #2c5282;
  transform: translateY(-2px);
  color: #1a365d;
  text-decoration: none;
}

.auth-wall-btn-secondary:active {
  transform: translateY(0);
}

/* Footer note */
.auth-wall-footer {
  font-size: 13px;
  color: #718096;
  margin-top: 20px;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

.auth-wall-footer a {
  color: #3182ce;
  text-decoration: none;
  font-weight: 500;
}

.auth-wall-footer a:hover {
  text-decoration: underline;
}

/* Language toggle */
.auth-wall-lang-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

html[dir="rtl"] .auth-wall-lang-toggle {
  right: auto;
  left: 20px;
}

.auth-wall-lang-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1a365d;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #3182ce;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cairo', 'Rubik', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-wall-lang-btn:hover {
  background: #fff;
  color: #2c5282;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Features/benefits list */
.auth-wall-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  padding: 0 10px;
}

.auth-wall-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4a5568;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

.auth-wall-feature i {
  color: #38a169;
  font-size: 14px;
}

/* Divider */
.auth-wall-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #a0aec0;
  font-size: 13px;
  font-family: 'Cairo', 'Rubik', sans-serif;
}

.auth-wall-divider::before,
.auth-wall-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-wall-divider span {
  padding: 0 15px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .auth-wall-content {
    padding: 30px 24px;
    margin: 15px;
  }

  .auth-wall-logo {
    max-width: 150px;
  }

  .auth-wall-title {
    font-size: 24px;
  }

  .auth-wall-subtitle {
    font-size: 15px;
  }

  .auth-wall-btn-primary,
  .auth-wall-btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
  }

  .auth-wall-features {
    flex-direction: column;
    align-items: center;
  }
}

/* Animation for loading state */
.auth-wall-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authWallSpin 0.8s linear infinite;
}

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

/* Beta badge in auth wall */
.auth-wall-beta {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

html[dir="rtl"] .auth-wall-beta {
  margin-left: 0;
  margin-right: 8px;
}

/* Platform name with gradient */
.auth-wall-brand {
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
