/* App entry design from the original MEBİ landing; shared with the React panel. */
html.mobile-app-gate-open,
html.mobile-app-gate-open body {
  overflow: hidden;
}

.mobile-app-gate {
  --font-main: var(--font-rubik, 'Rubik'), sans-serif;
  --color-primary: #0033b3;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  z-index: 10000;
  font-family: var(--font-main);
  text-align: center;
}

.mobile-app-gate,
.mobile-app-gate * {
  box-sizing: border-box;
}

.mobile-app-gate[open],
.mobile-app-gate[role="dialog"] {
  display: flex;
}

.mobile-app-gate::backdrop {
  background: #03114b;
}

.is-app-gate .appgallery-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 134px;
  height: 40px;
  padding: 4px 6px;
  color: #111;
  background-color: #fff;
  text-decoration: none;
}

.is-app-gate .appgallery-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  background-image: url(../../images/app-stores.webp);
  background-repeat: no-repeat;
  background-size: 1363px 954px;
  background-position: -1164px -526px;
}

.is-app-gate .appgallery-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.is-app-gate .appgallery-copy strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 15px;
}

.is-app-gate .appgallery-copy small {
  margin-top: 2px;
  font-size: 7px;
  font-weight: 600;
  line-height: 8px;
  letter-spacing: 0.01em;
}

.mobile-app-gate {
  padding: 0;
  height: 100dvh;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #03114b;
}

.is-app-gate .mobile-app-gate-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 100%;
  padding: max(68px, calc(env(safe-area-inset-top) + 52px)) 20px max(28px, calc(env(safe-area-inset-bottom) + 20px));
  border-radius: 0;
  background:
    radial-gradient(ellipse 85% 50% at 50% -6%, rgba(44, 108, 255, 0.56), transparent 72%),
    radial-gradient(ellipse 65% 42% at 88% 18%, rgba(0, 182, 191, 0.24), transparent 70%),
    radial-gradient(ellipse 75% 48% at 15% 100%, rgba(19, 64, 196, 0.52), transparent 70%),
    linear-gradient(175deg, #041559 0%, #052686 48%, #041b69 100%);
  box-shadow: none;
  overflow-x: clip;
  animation: none;
}

.is-app-gate .mobile-app-gate-content::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 32%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 32%, #000 10%, transparent 78%);
  opacity: 0.45;
}

@media (prefers-reduced-motion: no-preference) {
  .is-app-gate.active .login-app-panel {
    animation: appGateFadeUp 260ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both;
  }

  @keyframes appGateFadeUp {
    from {
      opacity: 0;
      transform: translateY(14px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

.is-app-gate .mobile-app-gate-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  z-index: 3;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
}

.is-app-gate .mobile-app-gate-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.is-app-gate .mobile-app-gate-close:active {
  transform: scale(0.94);
}

.login-app-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 392px;
  margin: auto;
  padding: 0;
  overflow: visible;
  text-align: center;
  color: #fff;
}

.login-app-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.login-app-logo {
  display: block;
  width: 104px;
  height: 60px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.login-app-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.login-app-ministry {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.96);
}

.login-app-platform {
  margin: 0;
  color: rgba(217, 229, 255, 0.8);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.login-app-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.login-app-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #edf3ff;
}

.login-app-rating-star {
  color: #fbbf24;
  flex-shrink: 0;
}

.login-app-rating strong {
  font-weight: 700;
  color: #fff;
}

.login-app-rating-sep {
  color: rgba(217, 229, 255, 0.48);
}

.login-app-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 5.5vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.login-app-intro p {
  max-width: 330px;
  margin: 0 auto;
  color: rgba(220, 232, 255, 0.88);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.login-app-stores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
}

.login-store-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 8px 14px 8px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(2, 11, 46, 0.24);
  color: #0f172a;
  text-align: left;
  text-decoration: none;
  transition: transform 160ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out;
  touch-action: manipulation;
}

.login-store-card:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(2, 11, 46, 0.32);
}

.login-store-card:active {
  transform: scale(0.985);
}

.login-store-badge-img {
  display: block;
  width: auto;
  height: 48px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.login-store-appgallery {
  display: inline-flex;
  align-items: center;
  height: 48px;
  min-width: 0;
  margin-left: 5px;
}

.login-store-appgallery .appgallery-badge {
  width: auto;
  height: 40px;
  padding: 4px 6px 4px 2px;
  background: transparent;
  transform: scale(1.14);
  transform-origin: left center;
}

.login-store-appgallery .appgallery-icon {
  border-radius: 7px;
  overflow: hidden;
  clip-path: inset(1px round 7px);
}

.login-store-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef3ff;
  color: var(--color-primary);
  transition: transform 160ms ease-out, background-color 160ms ease-out;
}

.login-store-card:hover .login-store-arrow {
  background: #dce7ff;
  transform: translateX(2px);
}

.login-app-web {
  position: relative;
  width: 100%;
  margin-top: 28px;
  padding-top: 20px;
}

.login-app-web::before {
  content: '';
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
}

.login-app-web p {
  margin: 0 0 10px;
  color: rgba(217, 229, 255, 0.85);
  font-size: 13px;
  line-height: 1.4;
}

.login-web-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 600 15px/1.3 var(--font-main, 'Rubik', sans-serif);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
}

.login-web-continue:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
}

.login-web-continue:active {
  transform: scale(0.985);
}

.login-web-continue svg {
  transition: transform 160ms ease-out;
}

.login-web-continue:hover svg {
  transform: translateX(2px);
}

.is-app-gate :is(a, button):focus-visible { outline: 3px solid #70eff0; outline-offset: 3px; }

@media (min-width: 640px) {
  .login-app-panel {
    max-width: 400px;
  }
}

@media (max-height: 740px) {
  .is-app-gate .mobile-app-gate-content {
    padding-top: max(56px, calc(env(safe-area-inset-top) + 44px));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .login-app-logo { width: 84px; height: 49px; margin-bottom: 10px; }
  .login-app-brand { margin-bottom: 14px; }
  .login-app-rating { margin-bottom: 10px; }
  .login-app-stores { margin-top: 18px; gap: 8px; }
  .login-store-card { min-height: 58px; padding: 8px 12px; border-radius: 16px; }
  .login-app-web { margin-top: 20px; padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-store-card,
  .login-store-arrow,
  .login-web-continue,
  .login-web-continue svg,
  .is-app-gate .mobile-app-gate-close {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .is-app-gate .mobile-app-gate-close {
    background: rgba(15, 34, 96, 0.92);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-height: 640px) {
  .is-app-gate .mobile-app-gate-content {
    padding-top: max(48px, calc(env(safe-area-inset-top) + 38px));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .login-app-logo { width: 68px; height: 40px; margin-bottom: 8px; }
  .login-app-rating { display: none; }
  .login-app-brand { margin-bottom: 10px; }
  .login-app-title { font-size: 20px; margin-bottom: 4px; }
  .login-app-intro p { font-size: 13px; line-height: 1.4; }
  .login-app-stores { margin-top: 14px; gap: 8px; }
  .login-store-card { min-height: 54px; padding: 7px 12px 7px 14px; border-radius: 14px; }
  .login-store-badge-img { height: 42px; }
  .login-store-appgallery { height: 42px; }
  .login-store-appgallery .appgallery-badge { transform: scale(1.04); }
  .login-app-web { margin-top: 16px; padding-top: 14px; }
  .login-app-web p { display: none; }
  .login-web-continue { min-height: 44px; font-size: 14px; }
}

.mobile-app-download-page {
  margin: 0;
  background-color: #03114b;
}

.mobile-app-download {
  position: static;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.mobile-app-download .mobile-app-gate-content {
  padding: 28px 20px;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
