/* ==========================================================================
   .glb-right-pop — Floating Right-Side Journey Launcher & Modal
   ========================================================================== */
.glb-right-pop {
  --glb-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --glb-bg: #ffffff;
  --glb-card-bg: #f6f8fc;
  --glb-card-bg-hover: #ffffff;
  --glb-card-border: #e3e8f2;
  --glb-theme-stops: #00a8ff 0%, #0a47ff 28%, #762e8e 56%, #e51b36 80%,
    #ff4800 100%;
  --glb-text-primary: #171b24;
  --glb-text-muted: #5e6878;
  --glb-header-muted: #566173;
  --glb-accent-orange: #ff4800;
  --glb-accent-blue: #0a47ff;
  --glb-shadow: 0 22px 58px rgba(10, 22, 54, 0.16),
    0 6px 18px rgba(10, 22, 54, 0.08);

  position: fixed;
  right: 26px;
  bottom: 22px;
  z-index: 9999;
  font-family: var(--glb-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.glb-right-pop *,
.glb-right-pop *::before,
.glb-right-pop *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Modal Dialog
   -------------------------------------------------------------------------- */
.glb-right-pop__modal {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 392px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  background-color: var(--glb-bg);
  border: 1px solid #e2e7f0;
  border-radius: 16px;
  box-shadow: var(--glb-shadow);
  overflow: hidden;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(0.92);
  transform-origin: bottom right;
  will-change: transform, opacity;
  transition:
    opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.28s;
}

.glb-right-pop.is-open .glb-right-pop__modal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* Header */
.glb-right-pop__header {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px 14px;
  background:
    radial-gradient(circle at 8% 20%,
      rgba(10, 71, 255, 0.07) 0%,
      rgba(10, 71, 255, 0) 52%),
    radial-gradient(circle at 92% 24%,
      rgba(255, 72, 0, 0.08) 0%,
      rgba(255, 72, 0, 0) 50%),
    linear-gradient(135deg, #ffffff 0%, #f6f8fd 55%, #fff8f4 100%);
}

.glb-right-pop__header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--glb-theme-stops));
}

.glb-right-pop__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 34px;
}

.glb-right-pop__logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.glb-right-pop__title-group {
  flex: 1;
  min-width: 0;
}

.glb-right-pop__title {
  margin: 0;
  color: var(--glb-text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.glb-right-pop__subtitle {
  margin: 2px 0 0;
  color: var(--glb-header-muted);
  font-size: 10.75px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glb-right-pop__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-right: -2px;
  border: 1px solid #dce2ee;
  border-radius: 50%;
  background-color: #ffffff;
  color: #364152;
  box-shadow: 0 2px 6px rgba(10, 22, 54, 0.07);
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.glb-right-pop__close:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #ff6a00 0%, #ff4800 100%);
  border-color: var(--glb-accent-orange);
  box-shadow: 0 4px 10px rgba(255, 72, 0, 0.28);
  transform: scale(1.05);
}

.glb-right-pop__close:focus-visible {
  outline: 2px solid var(--glb-accent-blue);
  outline-offset: 2px;
}

/* Body & Grid */
.glb-right-pop__body {
  padding: 11px 13px 13px;
  background-color: var(--glb-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.glb-right-pop__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* Feature Card */
.glb-right-pop__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90px;
  padding: 11px 12px 10px;
  border-radius: 12px;
  background-color: var(--glb-card-bg);
  border: 1px solid var(--glb-card-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.glb-right-pop__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--glb-theme-stops));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.glb-right-pop__card:hover {
  background-color: var(--glb-card-bg-hover);
  border-color: transparent;
  box-shadow:
    0 8px 20px rgba(10, 22, 54, 0.08),
    0 2px 12px rgba(10, 71, 255, 0.08);
  transform: translateY(-2px);
}

.glb-right-pop__card:hover::before {
  opacity: 1;
}

@keyframes glb-card-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.glb-right-pop.is-open .glb-right-pop__card {
  animation: glb-card-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(1) {
  animation-delay: 0.05s;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(2) {
  animation-delay: 0.08s;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(3) {
  animation-delay: 0.11s;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(4) {
  animation-delay: 0.14s;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(5) {
  animation-delay: 0.17s;
}

.glb-right-pop.is-open .glb-right-pop__card:nth-child(6) {
  animation-delay: 0.20s;
}

.glb-right-pop__card:focus-visible {
  outline: 2px solid var(--glb-accent-blue);
  outline-offset: 2px;
}

.glb-right-pop__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.glb-right-pop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef1f6 0%, #e4e8f0 100%);
  border: 1px solid #d5dce8;
  color: #163a84;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 32, 75, 0.05);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.glb-right-pop__card:hover .glb-right-pop__icon {
  background: linear-gradient(135deg, #e7ecf5 0%, #dce3f0 100%);
  border-color: #c2cee2;
  color: #102f72;
}

.glb-right-pop__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.glb-right-pop__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 72, 0, 0.1);
  border: 1px solid rgba(255, 72, 0, 0.24);
  color: var(--glb-accent-orange);
  box-shadow: 0 2px 6px rgba(255, 72, 0, 0.08);
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.glb-right-pop__arrow svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

.glb-right-pop__card:hover .glb-right-pop__arrow {
  background: linear-gradient(135deg, #ff6a00 0%, #ff4800 100%);
  border-color: var(--glb-accent-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 72, 0, 0.35);
  transform: translateX(3px) scale(1.06);
}

.glb-right-pop__card-content {
  margin-top: 8px;
}

.glb-right-pop__card-title {
  margin: 0;
  color: var(--glb-text-primary);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.glb-right-pop__card-desc {
  margin: 2px 0 0;
  color: var(--glb-text-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Floating Trigger Button & Dashed Cyan Orbit
   -------------------------------------------------------------------------- */
.glb-right-pop__trigger-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-left: auto;
}

.glb-right-pop__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(10, 71, 255, 0.3);
  pointer-events: none;
  animation: glb-orbit-spin 16s linear infinite;
}

.glb-right-pop__orbit-dot {
  position: absolute;
  top: 50%;
  right: -3.5px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd5bf 0%, #ff5a14 65%, #ff4800 100%);
  box-shadow:
    0 0 10px 2px rgba(255, 72, 0, 0.72),
    0 0 18px 4px rgba(10, 71, 255, 0.28);
}

@keyframes glb-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.glb-right-pop__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a47ff 0%, #762e8e 50%, #ff4800 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(10, 71, 255, 0.28),
    0 4px 14px rgba(255, 72, 0, 0.26);
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.22s ease;
}

.glb-right-pop__trigger:hover {
  transform: scale(1.06);
  box-shadow:
    0 12px 28px rgba(10, 71, 255, 0.36),
    0 6px 18px rgba(255, 72, 0, 0.34);
}

.glb-right-pop__trigger:active {
  transform: scale(0.97);
}

.glb-right-pop__trigger:focus-visible {
  outline: 2px solid var(--glb-accent-orange);
  outline-offset: 4px;
}

.glb-right-pop__trigger-icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.glb-right-pop__trigger-icon--compass {
  width: 25px;
  height: 25px;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.glb-right-pop__trigger-icon--close {
  width: 19px;
  height: 19px;
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
}

.glb-right-pop.is-open .glb-right-pop__trigger-icon--compass {
  opacity: 0;
  transform: scale(0.6) rotate(45deg);
}

.glb-right-pop.is-open .glb-right-pop__trigger-icon--close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Responsive adjustments */
@media (max-width: 440px) {
  .glb-right-pop {
    right: 14px;
    bottom: 14px;
  }

  .glb-right-pop__modal {
    width: calc(100vw - 28px);
    max-width: none;
  }

  .glb-right-pop__header {
    padding: 14px 14px 13px;
    gap: 10px;
  }

  .glb-right-pop__title {
    font-size: 14.5px;
  }

  .glb-right-pop__subtitle {
    font-size: 11px;
    white-space: normal;
  }

  .glb-right-pop__body {
    padding: 10px 12px 12px;
  }

  .glb-right-pop__grid {
    gap: 8px;
  }

  .glb-right-pop__card {
    min-height: 92px;
    padding: 11px;
  }
}

@media (max-width: 360px) {
  .glb-right-pop__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  .glb-right-pop__orbit,
  .glb-right-pop.is-open .glb-right-pop__card {
    animation: none;
  }

  .glb-right-pop__modal,
  .glb-right-pop__card,
  .glb-right-pop__arrow,
  .glb-right-pop__trigger,
  .glb-right-pop__trigger-icon {
    transition: none;
  }
}