/* ==========================================================================
   Guest to Account Smart Conversion Engine Styles (guest_conversion.css)
   Encourages anonymous guests to save their stars & progress into permanent cloud accounts.
   ========================================================================== */

/* 1. Milestone Conversion Modal Overlay */
.guest-conversion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10006;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  direction: rtl;
  font-family: var(--font-kids, 'Cairo', 'Tajawal', sans-serif);
  animation: guestModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guestModalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.guest-conversion-card {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #fbfaff 100%);
  border-radius: 28px;
  max-width: 520px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 25px 60px rgba(108, 92, 231, 0.25), 0 0 0 2px rgba(108, 92, 231, 0.12);
  text-align: center;
  max-height: 92vh;
  overflow-y: auto;
  border: 1.5px solid rgba(253, 203, 110, 0.4);
}

body.dark-mode .guest-conversion-card {
  background: linear-gradient(165deg, #1e1b4b 0%, #17153a 100%);
  border-color: rgba(253, 203, 110, 0.3);
  color: #ffffff;
}

.guest-conversion-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #f1f2f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  transition: all 0.2s ease;
  z-index: 2;
}

body.dark-mode .guest-conversion-close {
  background: #312e81;
  color: #cbd5e1;
}

.guest-conversion-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

/* Celebrating Mascot Header */
.guest-mascot-celebrate-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px auto;
  position: relative;
}

.guest-mascot-celebrate-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(108, 92, 231, 0.3));
}

.guest-conversion-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--color-primary, #6c5ce7);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

body.dark-mode .guest-conversion-title {
  color: #a5b4fc;
}

.guest-conversion-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.5;
  margin: 0 auto 16px auto;
  max-width: 440px;
}

body.dark-mode .guest-conversion-sub {
  color: #cbd5e1;
}

/* Stats Badges Row */
.guest-stats-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.guest-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guest-pill-stars {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.guest-pill-questions {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.guest-pill-badge {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* Security & Cloud Reassurance */
.guest-security-banner {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 22px;
  font-size: 0.84rem;
  color: #64748b;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

body.dark-mode .guest-security-banner {
  background: #252254;
  border-color: #3730a3;
  color: #cbd5e1;
}

.guest-security-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Action Buttons */
.guest-conversion-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-guest-convert-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  border: 1.5px solid #d1d5db;
  border-radius: 16px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.btn-guest-convert-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.btn-guest-convert-email {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6c5ce7 0%, #4834d4 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
  transition: all 0.2s ease;
}

.btn-guest-convert-email:hover {
  background: linear-gradient(135deg, #5844d8 0%, #3a25c2 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.45);
}

.btn-guest-convert-later {
  background: transparent;
  color: #64748b;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px;
  cursor: pointer;
  transition: color 0.15s ease;
}

body.dark-mode .btn-guest-convert-later {
  color: #94a3b8;
}

.btn-guest-convert-later:hover {
  color: #334155;
  text-decoration: underline;
}

/* 2. Embedded Session Summary Conversion Card */
.guest-summary-save-card {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08) 0%, rgba(253, 203, 110, 0.15) 100%);
  border: 2px dashed rgba(108, 92, 231, 0.35);
  border-radius: 20px;
  padding: 18px 20px;
  margin: 18px 0;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.dark-mode .guest-summary-save-card {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(253, 203, 110, 0.3);
}

.guest-save-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 280px;
}

.guest-save-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid rgba(108, 92, 231, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
  flex-shrink: 0;
}

body.dark-mode .guest-save-icon-circle {
  background: #1e1b4b;
  border-color: rgba(253, 203, 110, 0.3);
}

.guest-save-title-text {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-primary, #6c5ce7);
  margin-bottom: 2px;
}

body.dark-mode .guest-save-title-text {
  color: #ffeaa7;
}

.guest-save-sub-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1.4;
}

body.dark-mode .guest-save-sub-text {
  color: #cbd5e1;
}

.guest-save-buttons-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-guest-card-google {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn-guest-card-google:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  border-color: #94a3b8;
}

.btn-guest-card-email {
  background: var(--color-primary, #6c5ce7);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
  transition: all 0.2s ease;
}

.btn-guest-card-email:hover {
  background: #5844d8;
  transform: translateY(-2px);
}

/* 3. iPad PWA Floating Quick Badge */
.ipad-install-floating-badge {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  background: linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 45%, #ec4899 100%);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 50px;
  font-family: var(--font-kids, 'Cairo', sans-serif);
  font-size: 0.88rem;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: ipadBadgePulse 3s infinite ease-in-out;
}

@keyframes ipadBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(236, 72, 153, 0.6);
  }
}

.ipad-install-floating-badge:hover {
  transform: translateY(-2px) scale(1.04);
}

.ipad-install-floating-badge .badge-icon {
  font-size: 1.1rem;
}

.ipad-floating-close-btn {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  cursor: pointer;
  margin-right: 4px;
}

.ipad-floating-close-btn:hover {
  background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 600px) {
  .guest-summary-save-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .guest-save-info {
    flex-direction: column;
    text-align: center;
  }
  .guest-save-buttons-wrap {
    justify-content: center;
    width: 100%;
  }
  .btn-guest-card-google, .btn-guest-card-email {
    flex: 1;
    justify-content: center;
  }
  .ipad-install-floating-badge {
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
