/* Desktop quick-action rail — spread across the top bar (not clustered on the right) */

.top-nav__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.top-quick-actions {
  display: none;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(12px, 3vw, 40px);
  gap: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.top-quick-actions[data-logged-in="true"] {
  display: flex;
  justify-content: space-evenly;
}

.top-action-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 56px;
  max-width: 140px;
  padding: 4px 10px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.top-action-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.5);
  color: inherit;
}

.top-action-chip__label {
  white-space: nowrap;
}

.top-action-chip--deposit {
  color: #fde68a;
}

.top-action-chip--deposit .top-action-chip__icon,
.top-action-chip--deposit .top-action-chip__icon--deposit {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(252, 211, 77, 0.22) 0%, rgba(180, 83, 9, 0.35) 55%, rgba(69, 26, 3, 0.55) 100%);
  border: 1px solid rgba(252, 211, 77, 0.55);
  color: #fef3c7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(120, 53, 15, 0.35);
}

.top-action-chip--deposit .top-action-chip__label {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 9px;
  background: linear-gradient(90deg, #fef3c7 0%, #fbbf24 55%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.top-action-chip--deposit:hover {
  background: rgba(120, 53, 15, 0.22);
  border-color: rgba(252, 211, 77, 0.4);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.28);
}

.top-action-chip--deposit:hover .top-action-chip__icon--deposit {
  border-color: rgba(253, 230, 138, 0.85);
  color: #fffbeb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 1px rgba(180, 83, 9, 0.45);
}

.top-action-chip--withdraw {
  color: #fcd34d;
}

.top-action-chip--withdraw .top-action-chip__icon {
  background: rgba(120, 53, 15, 0.4);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.top-action-chip--withdraw:hover {
  background: rgba(146, 64, 14, 0.28);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.2);
}

.top-action-chip--history {
  color: #c4b5fd;
}

.top-action-chip--history .top-action-chip__icon {
  background: rgba(76, 29, 149, 0.35);
  border-color: rgba(167, 139, 250, 0.45);
  color: #a78bfa;
}

.top-action-chip--history:hover {
  background: rgba(91, 33, 182, 0.28);
  border-color: rgba(196, 181, 253, 0.5);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.22);
}

.top-action-chip--howto {
  color: #86efac;
}

.top-action-chip--howto .top-action-chip__icon {
  background: rgba(20, 83, 45, 0.4);
  border-color: rgba(74, 222, 128, 0.45);
  color: #4ade80;
}

.top-action-chip--howto:hover {
  background: rgba(22, 101, 52, 0.3);
  border-color: rgba(134, 239, 172, 0.5);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.2);
}

.top-action-chip--contact {
  color: #fdba74;
}

.top-action-chip--contact .top-action-chip__icon {
  background: rgba(124, 45, 18, 0.4);
  border-color: rgba(251, 146, 60, 0.45);
  color: #fb923c;
}

.top-action-chip--contact:hover {
  background: rgba(154, 52, 18, 0.28);
  border-color: rgba(253, 186, 116, 0.55);
  box-shadow: 0 0 18px rgba(251, 146, 60, 0.2);
}

.top-action-chip--chat {
  color: #7dd3fc;
}

.top-action-chip--chat .top-action-chip__icon {
  background: rgba(12, 74, 110, 0.45);
  border-color: rgba(216, 180, 254, 0.45);
  color: #d8b4fe;
}

.top-action-chip--chat:hover {
  background: rgba(14, 116, 144, 0.3);
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 18px rgba(216, 180, 254, 0.2);
}

.top-action-chip--scanner {
  color: #a5f3fc;
}

.top-action-chip--scanner .top-action-chip__icon {
  background: rgba(8, 47, 73, 0.65);
  border-color: rgba(34, 211, 238, 0.5);
  color: #22d3ee;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}

.top-action-chip--scanner:hover {
  background: rgba(14, 116, 144, 0.35);
  border-color: rgba(103, 232, 249, 0.75);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.28);
}

@media (max-width: 900px) {
  .top-quick-actions,
  .top-quick-actions[data-logged-in="true"] {
    display: none !important;
  }

  .top-action-chip--in-rail {
    display: none !important;
  }

  .top-nav__right {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
  }

  /* Hidden until login/register (JS sets data-logged-in and removes [hidden]) */
  .top-action-chip--mobile-bar {
    display: none !important;
  }

  .top-action-chip--mobile-bar[data-logged-in="true"]:not([hidden]) {
    display: inline-flex !important;
    flex: 0 0 auto;
    min-width: 48px;
    max-width: none;
    min-height: 32px;
    padding: 4px 7px 4px;
    box-sizing: border-box;
  }

  .top-action-chip--mobile-bar .top-action-chip__icon {
    width: 22px;
    height: 22px;
  }

  .top-action-chip--mobile-bar .top-action-chip__label {
    font-size: 9px;
  }

  .top-nav__right .balance-display[data-logged-in="true"] {
    display: flex !important;
  }
}

@media (min-width: 901px) {
  .top-action-chip--mobile-bar {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .top-nav {
    display: grid;
    grid-template-columns: minmax(200px, auto) minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
    column-gap: clamp(8px, 2vw, 24px);
    padding-left: 88px;
    padding-right: 20px;
  }

  .nav-left {
    grid-column: 1;
    min-width: 0;
  }

  .top-quick-actions[data-logged-in="true"] {
    grid-column: 2;
    justify-content: space-evenly;
    align-self: stretch;
    align-items: center;
    padding-top: 2px;
    padding-bottom: 2px;
    border-top: 1px solid rgba(51, 65, 85, 0.25);
    border-bottom: 1px solid rgba(51, 65, 85, 0.25);
    background: linear-gradient(
      90deg,
      rgba(2, 6, 23, 0) 0%,
      rgba(15, 23, 42, 0.55) 12%,
      rgba(15, 23, 42, 0.55) 88%,
      rgba(2, 6, 23, 0) 100%
    );
  }

  .top-nav__right {
    grid-column: 3;
    justify-content: flex-end;
    margin-left: 0;
    position: static;
    top: auto;
    right: auto;
  }

  /* Logged out: auth stays right; middle column unused */
  .top-nav:not(:has(.top-quick-actions[data-logged-in="true"])) {
    grid-template-columns: minmax(200px, auto) 1fr minmax(220px, auto);
  }
}

@media (min-width: 1200px) {
  .top-quick-actions[data-logged-in="true"] {
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
  }

  .top-action-chip {
    max-width: 160px;
  }
}
