/* ================================================
   WIFAQ LOGIN / TOPBAR / LOADING BRANDING
   ================================================ */

:root {
  --wifaq-navy: #0d2c4d;
  --wifaq-gold: #c49a45;
  --wifaq-brand-white: #ffffff;
}

/* Login page */
.wifaq-login-brand {
  width: 100%;
  text-align: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 2;
}

.wifaq-login-brand__logo {
  display: block;
  width: 270px;
  max-width: min(80vw, 270px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(13, 44, 77, 0.08));
}

.wifaq-login-brand__caption {
  display: none;
}

/* Top bar */
.wifaq-topbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  margin-inline: 10px;
  padding: 3px 10px 3px 5px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(196, 154, 69, 0.24);
  box-shadow: 0 3px 12px rgba(13, 44, 77, 0.10);
  white-space: nowrap;
  direction: rtl;
  z-index: 30;
}

.wifaq-topbar-brand__icon {
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  position: relative;
  flex: 0 0 38px;
}

.wifaq-topbar-brand__icon img {
  position: absolute;
  width: 76px;
  height: 76px;
  max-width: none;
  object-fit: cover;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(1.2);
}

.wifaq-topbar-brand__name {
  color: var(--wifaq-navy);
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  font-family: Tahoma, Arial, sans-serif;
}

/* Loading overlay */
#wifaq-global-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.99),
      rgba(248, 249, 251, 0.98)
    );
  opacity: 1;
  visibility: visible;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

#wifaq-global-loader.wifaq-loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wifaq-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 190px;
}

.wifaq-loader-symbol {
  width: 102px;
  height: 102px;
  overflow: hidden;
  position: relative;
  border-radius: 28px;
  background: #fff;
  box-shadow:
    0 15px 40px rgba(13, 44, 77, 0.12),
    0 0 0 1px rgba(196, 154, 69, 0.16);
}

.wifaq-loader-symbol::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 3px solid rgba(13, 44, 77, 0.10);
  border-top-color: var(--wifaq-gold);
  border-right-color: var(--wifaq-navy);
  border-radius: 34px;
  animation: wifaqLoaderSpin 1.15s linear infinite;
  z-index: 3;
}

.wifaq-loader-symbol img {
  position: absolute;
  width: 190px;
  height: 190px;
  max-width: none;
  left: 50%;
  top: 43%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.wifaq-loader-text {
  margin-top: 21px;
  color: var(--wifaq-navy);
  font-size: 15px;
  font-weight: 700;
  font-family: Tahoma, Arial, sans-serif;
}

.wifaq-loader-dots {
  display: inline-flex;
  gap: 4px;
  margin-inline-start: 5px;
}

.wifaq-loader-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wifaq-gold);
  animation: wifaqDot 1.1s infinite ease-in-out;
}

.wifaq-loader-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.wifaq-loader-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

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

@keyframes wifaqDot {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Prevent duplicate login titles from looking crowded */
.wifaq-login-brand + h1,
.wifaq-login-brand + h2 {
  margin-top: 4px !important;
}

/* Mobile */
@media (max-width: 768px) {
  .wifaq-login-brand__logo {
    width: 220px;
    max-width: 75vw;
  }

  .wifaq-topbar-brand {
    padding-inline: 4px;
    margin-inline: 5px;
  }

  .wifaq-topbar-brand__name {
    display: none;
  }

  .wifaq-topbar-brand__icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .wifaq-loader-symbol {
    width: 88px;
    height: 88px;
  }

  .wifaq-loader-symbol img {
    width: 168px;
    height: 168px;
  }
}

/* WIFAQ_HIDE_TOPBAR_LOGO_START */

.wifaq-topbar-brand {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* WIFAQ_HIDE_TOPBAR_LOGO_END */

