/* ============================================================
   Global Incoming Call Alert Modal
   Shown on any page when a device calls the admin.
   ============================================================ */
.ic-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0,0,0,.65);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.ic-backdrop--open { opacity: 1; pointer-events: auto; }

.ic-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.88);
    z-index: 2110;
    width: 92%;
    max-width: 440px;
    background: #0f1117;
    border: 2px solid var(--accent, #f59e0b);
    border-radius: 20px;
    box-shadow: 0 0 0 4px rgba(245,158,11,.18), 0 24px 64px rgba(0,0,0,.7);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
}
.ic-modal--open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    animation: icPulseGlow 1.6s ease-in-out infinite;
}

@keyframes icPulseGlow {
    0%,100% { box-shadow: 0 0 0 4px rgba(245,158,11,.18), 0 24px 64px rgba(0,0,0,.7); }
    50%     { box-shadow: 0 0 0 14px rgba(245,158,11,.32), 0 0 80px rgba(245,158,11,.15), 0 24px 64px rgba(0,0,0,.7); }
}

/* Header */
.ic-modal__header {
    background: linear-gradient(135deg, #78350f 0%, #92400e 50%, #78350f 100%);
    padding: 22px 24px 18px;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ic-modal__icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(245,158,11,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fbbf24;
    flex-shrink: 0;
    animation: icRing 1.2s ease-in-out infinite;
}
@keyframes icRing {
    0%,100% { transform: rotate(0); }
    15%     { transform: rotate(14deg); }
    30%     { transform: rotate(-14deg); }
    45%     { transform: rotate(10deg); }
    60%     { transform: rotate(-6deg); }
    75%     { transform: rotate(0); }
}

.ic-modal__header-text { flex: 1; min-width: 0; }
.ic-modal__header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ic-modal__header-sub {
    font-size: .82rem;
    color: rgba(255,255,255,.7);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ic-modal__close {
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1rem;
    cursor: pointer;
    padding: .25rem;
    border-radius: 6px;
    transition: all .2s;
    flex-shrink: 0;
}
.ic-modal__close:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}

/* Body */
.ic-modal__body {
    padding: 1.25rem 1.5rem;
}
.ic-detail-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ic-detail-row:last-child { border-bottom: none; }
.ic-detail-row__icon {
    color: var(--accent, #f59e0b);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.ic-detail-label {
    font-size: .7rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ic-detail-value {
    font-size: .88rem;
    font-weight: 600;
    color: #fff;
}

/* Footer */
.ic-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.2);
}

.ic-modal__footer .btn-accept {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .5rem 1.25rem;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s;
}
.ic-modal__footer .btn-accept:hover { background: #15803d; }

.ic-modal__footer .btn-reject {
    background: rgba(239,68,68,.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 10px;
    padding: .5rem 1.25rem;
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: all .2s;
}
.ic-modal__footer .btn-reject:hover {
    background: rgba(239,68,68,.25);
    border-color: rgba(239,68,68,.5);
}

/* Sound indicator */
.ic-sound-indicator {
    display: none;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    color: #fbbf24;
    margin-right: auto;
    animation: icSoundPulse 1.4s ease-in-out infinite;
}
@keyframes icSoundPulse {
    0%,100% { opacity: 1; }
    50% { opacity: .45; }
}
