/* ══════════════════════════════════════════════════
   TEAM HUB — CALL BAR
   Quick-dial toolbar below site header
   ══════════════════════════════════════════════════ */

.callbar {
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(206, 200, 182, 0.15);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.callbar::-webkit-scrollbar { display: none; }

.callbar-label {
  font-family: var(--mono-font);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Quick-dial chips */
.callbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(206, 200, 182, 0.25);
  background: rgba(255,255,255,0.06);
  color: #e8e4dc;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.callbar-chip:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
  color: #fff;
}
.callbar-chip:active {
  transform: scale(0.96);
}
.callbar-chip .chip-icon {
  font-size: 13px;
  line-height: 1;
}

/* Priority contacts — slightly brighter */
.callbar-chip.priority {
  border-color: rgba(206, 200, 182, 0.4);
  background: rgba(206, 200, 182, 0.1);
}

/* Team dropdown trigger */
.callbar-team-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(138, 165, 178, 0.3);
  background: rgba(138, 165, 178, 0.1);
  color: var(--accent-blue);
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}
.callbar-team-btn:hover {
  background: rgba(138, 165, 178, 0.2);
  color: #fff;
}

/* Team dropdown panel */
.callbar-dropdown {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  max-height: 100dvh;
  background: var(--navy);
  border-left: 1px solid rgba(206, 200, 182, 0.15);
  box-shadow: -4px 0 24px rgba(0,0,0,0.3);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}
.callbar-dropdown.open {
  display: flex;
}

.callbar-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(206, 200, 182, 0.15);
}
.callbar-dropdown-header h3 {
  font-family: var(--heading-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}
.callbar-dropdown-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(206, 200, 182, 0.2);
  background: transparent;
  color: var(--gold-dark);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.callbar-dropdown-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.callbar-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.callbar-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.callbar-contact:hover {
  background: rgba(255,255,255,0.06);
}
.callbar-contact-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(138, 165, 178, 0.2);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.callbar-contact-info {
  flex: 1;
  min-width: 0;
}
.callbar-contact-name {
  font-size: 13px;
  font-weight: 500;
  color: #e8e4dc;
}
.callbar-contact-number {
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--text-muted);
}
.callbar-contact-call {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.callbar-contact:hover .callbar-contact-call {
  opacity: 1;
}

/* Overlay behind dropdown */
.callbar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
}
.callbar-overlay.open { display: block; }

/* Calling state on chips */
.callbar-chip.calling {
  background: rgba(40, 167, 69, 0.15);
  border-color: var(--green);
  color: var(--green);
  pointer-events: none;
}
.callbar-chip.call-error {
  background: rgba(229, 57, 53, 0.15);
  border-color: var(--red);
  color: var(--red);
}

/* Location chips — distinct from contact chips */
.callbar-chip.location {
  border-color: rgba(138, 165, 178, 0.4);
  background: rgba(138, 165, 178, 0.1);
  color: var(--accent-blue);
}
.callbar-chip.location:hover {
  background: rgba(138, 165, 178, 0.25);
  border-color: var(--accent-blue);
  color: #fff;
}

/* Divider between contact chips and location chips */
.callbar-divider {
  color: rgba(206, 200, 182, 0.25);
  font-size: 14px;
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── Active Call Banner ── */
.callbar-active-call {
  background: linear-gradient(135deg, #1b7a3d, #28a745);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: callbar-slide-in 0.3s ease;
}
.callbar-active-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.callbar-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: callbar-pulse 1.5s ease infinite;
}
.callbar-active-label {
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.callbar-active-timer {
  font-family: var(--mono-font);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}
.callbar-hangup-btn {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.callbar-hangup-btn:hover {
  background: #e74c3c;
}
.callbar-hangup-btn:active {
  transform: scale(0.95);
}

@keyframes callbar-slide-in {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes callbar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Responsive — hide label on very small screens */
@media (max-width: 380px) {
  .callbar-label { display: none; }
  .callbar { padding: 6px 10px; }
  .callbar-active-call { padding: 8px 10px; }
}
