/* client/css/chat/call.css */

/* Кнопка звонка в шапке чата */
.call-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;  /* прижимает к правому краю */
    padding: 0 0.5rem;
    color: #ff8c00;
    transition: color 0.2s;
}
.call-button:hover {
    color: #e67e00;
}
.call-button.active {
    color: #ff4d4d; /* красный для активного звонка (завершить) */
}
.call-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Модальное окно входящего вызова */
.call-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.call-modal {
    background: #2a2a2a;
    border: 2px solid #ff8c00;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    color: #f0f0f0;
    word-break: break-word; /* предотвращает вылезание длинных слов */
}
.call-modal h3 {
    margin-top: 0;
    color: #ff8c00;
}
.call-modal p {
    margin: 1rem 0;
    font-size: 1.2rem;
}
.modal-buttons {
    display: flex;
    flex-wrap: wrap;        /* позволяет кнопкам переноситься */
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.modal-buttons button {
    flex: 0 1 auto;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    background: #ff8c00;
    color: #1a1a1a;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-buttons button:hover {
    background: #e67e00;
}
.modal-buttons button.reject {
    background: #444;
    color: #fff;
}
.modal-buttons button.reject:hover {
    background: #555;
}

/* Для очень маленьких экранов разрешаем перенос текста внутри кнопок */
@media (max-width: 400px) {
    .modal-buttons button {
        white-space: normal;
        min-width: 100px;
    }
}

/* Индикатор активного звонка в списке диалогов */
.dialog-avatar {
    position: relative;
}
.call-indicator-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 12px;
    background: #ff8c00;
    border-radius: 50%;
    padding: 2px;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}