/*----------------------------------------*/
/*  Astroshipx brand: logo + preloader
/*  Colours fall back so this works on pages
/*  that do not load main.css (details.php).
/*----------------------------------------*/

/* ============ logo ============ */
.pd-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  line-height: 1;
}

.pd-logo__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  transition: transform .3s ease;
}

.pd-logo:hover .pd-logo__mark { transform: translateY(-2px) rotate(-4deg); }

.pd-logo__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
}

.pd-logo__word {
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.pd-logo__word span { color: var(--tp-theme-1, #00ffff); }

.pd-logo__tag {
  color: #7c8ba5;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
}

/* on a light background (the tracking details template) */
.pd-logo--onlight .pd-logo__word { color: #162236; }
.pd-logo--onlight .pd-logo__tag { color: #64748b; }

/* size variants */
.pd-logo--sm .pd-logo__mark { width: 34px; height: 34px; border-radius: 10px; }
.pd-logo--sm .pd-logo__word { font-size: 17px; }
.pd-logo--sm .pd-logo__tag { font-size: 8.5px; letter-spacing: .24em; }

.pd-logo--lg .pd-logo__mark { width: 48px; height: 48px; border-radius: 14px; }
.pd-logo--lg .pd-logo__word { font-size: 24px; }

/* the sticky header shrinks its logo with the bar */
.header-sticky .pd-logo__mark { width: 36px; height: 36px; }
.header-sticky .pd-logo__word { font-size: 19px; }

@media (max-width: 575px) {
  .pd-logo__mark { width: 36px; height: 36px; border-radius: 10px; }
  .pd-logo__word { font-size: 18px; }
  .pd-logo__tag { font-size: 8px; letter-spacing: .2em; }
}

@media (max-width: 359px) {
  .pd-logo__text { display: none; }
}

/* ============ preloader ============ */
#loading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #080d16;
  overflow: hidden;
}

#loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44rem;
  height: 44rem;
  max-width: 120vw;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: none;
  animation: pdPulse 2.6s ease-in-out infinite;
}

@keyframes pdPulse {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.09); }
}

.pd-preloader {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

/* the mark rides in on a repeating route */
.pd-preloader__mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  animation: pdFloat 2.2s ease-in-out infinite;
}

@keyframes pdFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-5deg); }
}

.pd-preloader__word {
  margin-top: 24px;
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.pd-preloader__word span { color: var(--tp-theme-1, #00ffff); }

.pd-preloader__tag {
  margin-top: 7px;
  color: #64748b;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
}

/* indeterminate progress rail */
.pd-preloader__bar {
  position: relative;
  width: 210px;
  height: 3px;
  margin-top: 30px;
  border-radius: 3px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.pd-preloader__bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  border-radius: 3px;
  background: var(--tp-theme-2);
  animation: pdSlide 1.35s cubic-bezier(.65, 0, .35, 1) infinite;
}

@keyframes pdSlide {
  0% { left: -45%; }
  100% { left: 100%; }
}

.pd-preloader__note {
  margin: 18px 0 0;
  color: #475569;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
  #loading::before,
  .pd-preloader__mark { animation: none; }
  .pd-preloader__bar span { animation-duration: 3s; }
}

/* the tracking details template hides .navbar-brand-box, so the logo gets its own wrapper */
.pd-topbar-brand {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 0;
}
