/* Anrufen per Klick ueber Sipgate (11.11.2026, core/static/js/sipgate_call.js) */

/* Telefonfeld der Karte mit Knopf rechts im Feld */
.kanban-phone-field {
    position: relative;
    display: block;
}

.kanban-phone-field > input {
    width: 100%;
    padding-right: 38px !important;
}

.kanban-phone-call {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #036b3a;
    cursor: pointer;
    transform: translateY(-50%);
}

.kanban-phone-call:hover {
    background: #e7f4ec;
}

.kanban-phone-call svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

[data-sipgate-call].is-busy {
    opacity: .55;
    pointer-events: none;
}

/* Rueckmeldung unten in der Mitte - kein Balken, der die Seite verschiebt */
.sipgate-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 10000;
    max-width: min(520px, calc(100vw - 32px));
    padding: 10px 16px;
    border-radius: 8px;
    background: #172033;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
    color: #fff;
    font-size: 13.5px;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .15s ease, transform .15s ease;
}

.sipgate-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.sipgate-toast.is-error {
    background: #b42318;
}

/* ---------- Eingehender Anruf (11.11.2026) - unten rechts, ueber allem ---------- */
.sipgate-incoming {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.sipgate-incoming-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
    color: #172033;
}

.sipgate-incoming-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sipgate-incoming-pulse {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #036b3a;
    box-shadow: 0 0 0 0 rgba(3, 107, 58, .5);
    animation: sipgate-pulse 1.2s ease-out infinite;
}

.sipgate-incoming-card.is-answered .sipgate-incoming-pulse {
    animation: none;
    background: #9aa1ad;
}

@keyframes sipgate-pulse {
    to {
        box-shadow: 0 0 0 10px rgba(3, 107, 58, 0);
    }
}

.sipgate-incoming-title {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.sipgate-incoming-title b {
    font-size: 14px;
}

.sipgate-incoming-title small,
.sipgate-incoming-none {
    color: #6b7280;
    font-size: 12px;
}

.sipgate-incoming-none {
    margin: 0;
}

.sipgate-incoming-close {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.sipgate-incoming-close:hover {
    background: #f1f3f6;
}

.sipgate-incoming-match {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f1f3f6;
    color: inherit;
    text-decoration: none;
}

.sipgate-incoming-match:hover {
    background: #e7f4ec;
}

.sipgate-incoming-match-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.sipgate-incoming-match-text b {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sipgate-incoming-match-text small {
    overflow: hidden;
    color: #6b7280;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sipgate-incoming-open {
    flex-shrink: 0;
    color: #036b3a;
    font-size: 12.5px;
    font-weight: 600;
}
