/* === Скелетоны (skeleton loading) === */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
    display: inline-block;
}
.skeleton--text { width: 100%; height: 14px; margin: 4px 0; }
.skeleton--title { width: 60%; height: 20px; margin: 8px 0; }
.skeleton--card {
    width: 100%;
    height: 80px;
    margin: 8px 0;
    border-radius: 8px;
}
.skeleton--row {
    width: 100%;
    height: 36px;
    margin: 2px 0;
}
.skeleton--badge {
    width: 60px;
    height: 20px;
    border-radius: 10px;
    display: inline-block;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}
.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
    display: block;
}
.htmx-request#leads-table-wrapper {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Спиннер для HTMX-запросов */
.htmx-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 100;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Skeleton для таблицы лидов */
.leads-skeleton {
    padding: 16px;
}
.leads-skeleton .skeleton--row {
    height: 40px;
    margin: 4px 0;
}

/* Skeleton для канбан-карточек */
.kanban-skeleton-card {
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    height: 80px;
}
