/* static/css/video_call_button.css */
/* Стили для кнопки видео-звонка в дашборде */

.video-call-item {
    margin-top: auto;
}

.video-call-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #EE82EE 0%, #4B0082 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow:
    inset 0 -3em 3em rgba(0, 0, 0, 0.1),
    0 0 0 0.5px rgb(255, 255, 255),
    0.3em 0.3em 1em rgba(0, 0, 0, 0.3);
}

.video-call-btn:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4)
}

.video-icon {
    width: 20px;
    height: 20px;
}

/* Модальное окно для подтверждения звонка */
.call-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.call-modal.active {
    display: flex !important;
}

.call-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.call-modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.call-modal-content p {
    color: #666;
    margin-bottom: 10px;
}

.call-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.call-modal-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.confirm-call {
    background: #4CAF50;
    color: white;
}

.confirm-call:hover {
    background: #45a049;
}

.cancel-call {
    background: #f44336;
    color: white;
}

.cancel-call:hover {
    background: #d32f2f;
}

/* Модальное окно выбора получателя */
.recipient-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.recipient-modal.active {
    display: flex !important;
}

.recipient-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.recipient-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.recipient-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-recipient-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-recipient-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.recipient-status-info {
    padding: 12px 24px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.online-indicator {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.recipients-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.loading-recipients {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.recipient-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
    border: 1px solid #eee;
    flex-wrap: wrap; /* ← ДОБАВЛЕНО */
}

.recipient-card:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.recipient-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /* ← ДОБАВЛЕНО - фото не сжимается */
}

.recipient-info {
    flex: 1;
    min-width: 0; /* ← ДОБАВЛЕНО - позволяет тексту сжиматься */
}

.recipient-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden; /* ← ДОБАВЛЕНО */
    text-overflow: ellipsis; /* ← ДОБАВЛЕНО */
    word-wrap: break-word; /* ← ДОБАВЛЕНО - перенос длинных имён */
}

.recipient-role {
    font-size: 13px;
    color: #999;
}

.call-recipient-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0; /* ← ДОБАВЛЕНО - кнопка не сжимается */
    white-space: nowrap; /* ← ДОБАВЛЕНО - текст кнопки не переносится */
}

.call-recipient-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Мобильная адаптация - кнопка на всю ширину когда на новой строке */
@media (max-width: 480px) {
    .recipient-card {
        gap: 8px;
    }

    .call-recipient-btn {
        width: 100%; /* На узких экранах кнопка занимает всю ширину */
        justify-content: center;
        margin-top: 4px; /* Небольшой отступ сверху когда переносится */
    }
}

.no-recipients {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-recipients p {
    font-size: 16px;
    margin-bottom: 8px;
}

.no-recipients small {
    font-size: 13px;
    color: #bbb;
}
