/* Call centre colours and call-back buttons. */

.v2p-call-card {
  position: relative;
  padding-right: 4.6rem;
  border-left-width: 5px;
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.v2p-call-card:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1); }
.v2p-call-card.is-ringing { border-color: #fecaca; border-left-color: #dc2626; background: #fef2f2; animation: v2cc-ring 1.4s ease-in-out infinite; }
.v2p-call-card.is-active { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; }
.v2p-call-card.is-missed { border-color: #fed7aa; border-left-color: #ea580c; background: #fff7ed; }
.v2p-call-card.is-ended { border-left-color: #94a3b8; }
.v2p-call-card.is-selected { border-color: #e0b42b; border-left-color: #e0b42b; background: #fffbeb; box-shadow: 0 0 0 2px #e0b42b; }

@keyframes v2cc-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18); }
}

.v2p-call-card > strong { color: #475569; font-size: 0.78rem; font-weight: 650; }
.v2p-call-card > em { order: -1; color: #0b1f3a; font-size: 1rem; font-weight: 800; letter-spacing: 0.01em; }
.v2p-call-card > .v2p-call-state { order: -2; }
.v2p-call-card > small { color: #64748b; }

.v2p-call-card > .v2p-call-state::after { margin-left: 0.4rem; opacity: 0.75; }
.v2p-call-card[data-direction="inbound"] > .v2p-call-state::after { content: "\2199  in"; }
.v2p-call-card[data-direction="outbound"] > .v2p-call-state::after { content: "\2197  out"; }

.v2p-call-card > [data-role="callback"] {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  min-width: 3.4rem;
  height: 2.1rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}
.v2p-call-card > [data-role="callback"]:hover { background: #15803d; }

/* Filter chips: All, Live, Ringing, Missed. */
.v2p-call-queue .v2p-chips button:nth-child(2) { color: #166534; }
.v2p-call-queue .v2p-chips button:nth-child(3) { color: #b91c1c; }
.v2p-call-queue .v2p-chips button:nth-child(4) { color: #c2410c; }
.v2p-call-queue .v2p-chips button:nth-child(2).is-active { background: #16a34a; color: #fff; }
.v2p-call-queue .v2p-chips button:nth-child(3).is-active { background: #dc2626; color: #fff; }
.v2p-call-queue .v2p-chips button:nth-child(4).is-active { background: #ea580c; color: #fff; }

/* Selected caller header takes the colour of the call state. */
.v2p-caller { border-left: 6px solid #94a3b8; background: #f8fafc; }
.v2p-caller:has(.v2p-call-state.is-ringing) { border-left-color: #dc2626; background: #fef2f2; }
.v2p-caller:has(.v2p-call-state.is-active) { border-left-color: #16a34a; background: #f0fdf4; }
.v2p-caller:has(.v2p-call-state.is-missed) { border-left-color: #ea580c; background: #fff7ed; }
.v2p-caller h2 { color: #0b1f3a; }

.v2p-caller [data-testid="v2-caller-phone"] {
  width: fit-content;
  color: #166534;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.v2p-caller [data-role="callback-detail"] {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  margin: 0.4rem 0 0.2rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.v2p-caller [data-role="callback-detail"]:hover { background: #15803d; }

.v2p-call-detail [data-testid="v2-operator-dial"] {
  margin: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e0b42b;
  border-radius: 12px;
  background: #fffbeb;
}
.v2p-call-detail [data-testid="v2-operator-dial"] button[type="submit"]:not(:disabled) { background: #e0b42b; color: #0b1f3a; }

.v2p-call-detail .v2p-history h3,
.v2p-call-jobs h3 { color: #0b1f3a; }

.v2p-call-jobs a.v2p-btn[href^="tel:"] { border-color: #16a34a; background: #16a34a; color: #fff; font-weight: 800; }
