/* fcc-unified-fab.css — Single orb launcher (bottom-left) */

/* ── Hide old individual FABs ─────────────────────────────────────────────── */
#fcc-chat-btn,
.fcc-twg-fab {
  display: none !important;
}

/* ── Hide search from header ──────────────────────────────────────────────── */
.fcc-econav-search {
  display: none !important;
}

/* ── Unified orb ──────────────────────────────────────────────────────────── */
.fcc-ufab {
  position: fixed;
  bottom: 7.5rem;
  left: 1.5rem;
  z-index: 9700;
}

.fcc-ufab-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1.5px solid rgba(99, 102, 241, .4);
  background: rgba(15, 16, 19, .92);
  color: rgba(199, 210, 254, .85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .5);
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
.fcc-ufab-btn:hover,
.fcc-ufab-btn:focus-visible {
  background: rgba(30, 32, 40, .96);
  color: #c7d2fe;
  box-shadow: 0 2px 20px rgba(99, 102, 241, .3);
  transform: scale(1.06);
  outline: none;
}
.fcc-ufab-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  pointer-events: none;
  transition: transform .2s;
}
.fcc-ufab.is-open .fcc-ufab-btn svg {
  transform: rotate(45deg);
}

/* ── Popover menu ─────────────────────────────────────────────────────────── */
.fcc-ufab-menu {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.fcc-ufab.is-open .fcc-ufab-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.fcc-ufab-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(99, 102, 241, .25);
  background: rgba(15, 16, 19, .94);
  color: rgba(199, 210, 254, .9);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .12s, color .12s, border-color .12s, transform .12s;
  letter-spacing: 0.01em;
}
.fcc-ufab-item:hover,
.fcc-ufab-item:focus-visible {
  background: rgba(30, 32, 40, .96);
  color: #e0e7ff;
  border-color: rgba(99, 102, 241, .5);
  transform: translateX(2px);
  outline: none;
}
.fcc-ufab-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  pointer-events: none;
}

/* ── Search overlay (triggered from menu) ─────────────────────────────────── */
.fcc-ufab-search-overlay {
  position: fixed;
  bottom: 11rem;
  left: 1.5rem;
  z-index: 9710;
  width: min(22rem, calc(100vw - 3rem));
  background: rgba(15, 16, 19, .96);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 0.65rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.fcc-ufab-search-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.fcc-ufab-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.fcc-ufab-search-icon {
  position: absolute;
  left: 0.6rem;
  color: var(--text-dim, #9aa3b2);
  pointer-events: none;
}
.fcc-ufab-search-input {
  width: 100%;
  background: rgba(255, 255, 255, .04);
  color: var(--text, #f5f6f7);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0.4rem;
  padding: 0.55rem 0.7rem 0.55rem 2rem;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.fcc-ufab-search-input:focus {
  border-color: rgba(99, 102, 241, .6);
}
.fcc-ufab-search-input::placeholder {
  color: #4b5563;
}

.fcc-ufab-search-dropdown {
  max-height: 18rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.fcc-ufab-search-dropdown[hidden] {
  display: none;
}

.fcc-ufab-search-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.35rem;
  color: var(--text, #f5f6f7);
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .1s;
}
.fcc-ufab-search-item:hover,
.fcc-ufab-search-item.is-active {
  background: rgba(99, 102, 241, .12);
}
.fcc-ufab-search-item-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.fcc-ufab-search-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Reposition chat panel to bottom-left when opened from unified FAB ──── */
.fcc-ufab-chat-left #fcc-chat-panel {
  right: auto !important;
  left: 1.5rem !important;
}

/* ── Reposition ticket modal to bottom-left when opened from unified FAB ── */
.fcc-ufab-ticket-left .fcc-twg-modal {
  right: auto !important;
  left: 1.5rem !important;
}

/* ── Narrow screens ───────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .fcc-ufab {
    bottom: max(7rem, calc(7rem + env(safe-area-inset-bottom, 0px)));
    left: max(1rem, calc(1rem + env(safe-area-inset-left, 0px)));
  }
  .fcc-ufab-search-overlay {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
  }
}
