/**
 * GIPIX CRM — статусы клиентов, мобильные бейджи, аватар со статусом.
 * Этап 7. Подключать после components-filters.css.
 */

/* === СТАТУСНЫЕ БЕЙДЖИ КЛИЕНТОВ === */
.client-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
    overflow: hidden;
}

.client-status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    /* Анимация убрана для улучшения производительности */
}

.client-status-new {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.client-status-reg {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    /* Анимация убрана для улучшения производительности */
}

@keyframes pulse-glow-reg {
    0%,
    100% {
        box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.5);
    }
}

.client-status-vip {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    /* Анимация убрана для улучшения производительности */
}

@keyframes pulse-glow-vip {
    0%,
    100% {
        box-shadow: 0 1px 3px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.6), 0 0 15px rgba(255, 107, 53, 0.3);
    }
}

/* Стили для мобильных статусных бейджей */
.mobile-client-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 6px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
}

.mobile-client-status-badge .material-icons {
    font-size: 10px;
}

.mobile-client-status-new {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.mobile-client-status-reg {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.mobile-client-status-vip {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

/* Интеграция статусных бейджей в карточки клиентов */
.client-info-with-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-status-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Стили для статуса поверх аватарки в десктопной версии */
.client-avatar-img {
    position: relative !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    overflow: visible !important;
}

.client-avatar-img .avatar-image {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    object-fit: cover;
}

/* Fallback скрыт до onerror у img; при показе — inline display:flex из onerror + .client-avatar-fallback из style.css */
.client-avatar-img .client-avatar-fallback {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    display: none;
}

.client-avatar-img .client-status-badge {
    position: absolute !important;
    bottom: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.client-avatar-img .client-status-badge .material-icons {
    font-size: 10px;
}
