/**
 * EDU — Mobile audience launcher (portal picker, phones only)
 */

html.edu-view-web:has(.edu-mobile-launcher-body),
html.edu-view-web:has(.edu-mobile-launcher-body) body.edu-mobile-launcher-body {
  background: #ffffff !important;
}

.edu-mobile-launcher-body {
  margin: 0;
  min-height: 100dvh;
  background: #ffffff !important;
  color: #0b1426;
  font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.edu-mobile-launcher-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.edu-mobile-launcher__topbar {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  inset-inline-end: 14px;
  z-index: 30;
}

.edu-mobile-launcher__topbar .edu-lang-switch {
  position: static !important;
  margin: 0 !important;
  padding: 2px !important;
  background: #ffffff !important;
  border: 1px solid #e8edf3 !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

.edu-mobile-launcher__topbar .edu-lang-dropdown__panel {
  inset-inline-end: 0;
  inset-inline-start: auto;
}

.edu-mobile-launcher {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
  box-sizing: border-box;
  padding:
    calc(48px + env(safe-area-inset-top, 0px))
    18px
    calc(20px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

body.edu-mobile-launcher-body:not(.edu-loader-active) .edu-mobile-launcher {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.edu-mobile-launcher__hero {
  text-align: center;
  padding: 4px 8px 18px;
}

.edu-mobile-launcher__hero .edu-brand-logo--hero {
  margin: 0 auto 12px;
}

.edu-mobile-launcher__hero h1 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  color: #0b1426;
  letter-spacing: -0.01em;
}

.edu-mobile-launcher__hero p {
  margin: 0 auto;
  max-width: 30ch;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.edu-mobile-launcher__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(400px, 100%);
  margin: 0 auto;
}

.edu-mobile-launcher__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 100px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  text-decoration: none;
  color: #0b1426;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  opacity: 0;
}

body.edu-mobile-launcher-body:not(.edu-loader-active) .edu-mobile-launcher__item {
  animation: edu-mobile-launcher-in 0.38s ease forwards;
  animation-delay: calc(60ms + (var(--i, 0) * 40ms));
}

@keyframes edu-mobile-launcher-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.edu-mobile-launcher__item:active {
  transform: scale(0.98);
  border-color: #fdba74;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.edu-mobile-launcher__item--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 14px 16px;
  text-align: start;
  background: #0b1426;
  border-color: #0b1426;
  box-shadow: 0 8px 20px rgba(11, 20, 38, 0.12);
}

.edu-mobile-launcher__item--featured .edu-mobile-launcher__label {
  color: #ffffff;
  text-align: start;
}

.edu-mobile-launcher__item--featured .edu-mobile-launcher__icon .edu-app-icon {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.edu-mobile-launcher__badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.edu-mobile-launcher__badge--recommended {
  background: #f1f5f9;
  color: #475569;
}

.edu-mobile-launcher__item.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

.edu-mobile-launcher__item.is-loading .edu-mobile-launcher__icon .edu-app-icon {
  animation: edu-mobile-launcher-pulse 0.9s ease-in-out infinite;
}

@keyframes edu-mobile-launcher-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.95); }
}

.edu-mobile-launcher__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.edu-mobile-launcher__icon .edu-app-icon,
.edu-mobile-launcher__icon .edu-app-icon--edu,
.edu-mobile-launcher__icon .edu-app-icon--brand,
.edu-mobile-launcher__icon .edu-app-icon--sky,
.edu-mobile-launcher__icon .edu-app-icon--success,
.edu-mobile-launcher__icon .edu-app-icon--warn,
.edu-mobile-launcher__icon .edu-app-icon--rose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
  box-shadow: none;
}

.edu-mobile-launcher__icon .edu-app-icon-svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  flex-shrink: 0;
}

.edu-mobile-launcher__label {
  max-width: 100%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: #0b1426;
}

.edu-mobile-launcher__auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(400px, 100%);
  margin: 4px auto 0;
  opacity: 0;
}

body.edu-mobile-launcher-body:not(.edu-loader-active) .edu-mobile-launcher__auth {
  animation: edu-mobile-launcher-in 0.38s ease forwards;
  animation-delay: 420ms;
}

.edu-mobile-launcher__footer {
  width: min(400px, 100%);
  margin: 0 auto;
  padding-bottom: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  color: #94a3b8;
}

.edu-mobile-launcher__auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.edu-mobile-launcher__auth-btn:active {
  transform: scale(0.98);
}

.edu-mobile-launcher__auth-btn--login,
.edu-mobile-launcher__auth-btn--profile {
  color: #ffffff;
  background: #0b1426;
  border: 1px solid #0b1426;
  box-shadow: 0 4px 14px rgba(11, 20, 38, 0.12);
}

.edu-mobile-launcher__auth-btn--register {
  color: #ffffff;
  background: #f97316;
  border: 1px solid #f97316;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.18);
}

@media (max-width: 359px) {
  .edu-mobile-launcher__label {
    font-size: 10px;
  }

  .edu-mobile-launcher__item {
    min-height: 96px;
  }

  .edu-mobile-launcher__hero h1 {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-mobile-launcher,
  .edu-mobile-launcher__item,
  .edu-mobile-launcher__auth {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .edu-mobile-launcher__item.is-loading .edu-mobile-launcher__icon .edu-app-icon {
    animation: none !important;
  }
}

@media (min-width: 821px) {
  .edu-mobile-launcher-body {
    display: none;
  }
}
