/* Skeleton bones for AJAX list loading (companies catalog + company reviews).
   Markup is generated by lists.js; wrappers reuse the real card classes so
   geometry, spacing and responsive hiding come from list-rate.css /
   review-card.css — only the bones themselves are styled here. */

.is-skeleton {
    pointer-events: none;
}

/* Tone sits between --color-bg (#F7F7F8) and --color-border (#E8E6F0):
   visible on the white card without reading as a border. */
.skeleton-line {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 6px;
    background-color: #EFEDF4;
}
.skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Static bones stay; only the sweep goes. */
    .skeleton-line::after {
        animation: none;
    }
}

/* --- Company row (companies catalog) --- */

/* The rank circle must be a blank bone, not a number/trophy glyph; the
   nth-child selector keeps the override ahead of the trophy variant. */
.list-rate_item.is-skeleton::before,
.list-rate_item.is-skeleton:nth-child(-n+3)::before {
    content: '';
    background-color: #EFEDF4;
    border-color: transparent;
}
/* Real .name is sized by its text and pushes the rest right via
   margin-right: auto; an empty bone has no text, so grow explicitly —
   otherwise the 55% line resolves against a collapsed box. */
.list-rate_item.is-skeleton .name {
    flex-grow: 1;
}
.list-rate_item.is-skeleton .name .skeleton-line {
    width: 55%;
    height: 16px;
}
.list-rate_item.is-skeleton .progress .skeleton-line--bar {
    width: 165px;
    height: 10px;
}
.list-rate_item.is-skeleton .progress .skeleton-line--value {
    width: 40px;
    height: 24px;
    margin-left: 10px;
}
.list-rate_item.is-skeleton .rate .skeleton-line {
    width: 130px;
    height: 24px;
}
.list-rate_item.is-skeleton .comment .skeleton-line {
    width: 60px;
    height: 24px;
}
.list-rate_item.is-skeleton .link .skeleton-line {
    width: 90px;
    height: 16px;
}

@media (max-width: 650px) {
    /* On narrow rows the name is the dominant element; 55% of the squeezed
       flex box reads thinner than the 130px stars bone next to it. */
    .list-rate_item.is-skeleton .name .skeleton-line {
        width: 90%;
    }
}

@media (max-width: 576px) {
    /* The real row swaps the link text for an arrow glyph here and hides
       .link > span — a glyph can't be a bone, so drop it and show a compact
       icon-sized bone instead. */
    .list-rate_item.is-skeleton .link::before {
        display: none;
    }
    .list-rate_item.is-skeleton .link > .skeleton-line {
        display: inline-block;
        width: 20px;
        height: 20px;
    }
}

/* --- Review card (company page) --- */

.review-card.is-skeleton .skeleton-line--stars {
    width: 150px;
    height: 24px;
}
.review-card.is-skeleton .skeleton-line--date {
    width: 80px;
    height: 16px;
}
.review-card.is-skeleton .name .skeleton-line {
    width: 140px;
    height: 16px;
}
.review-card.is-skeleton .text .skeleton-line {
    display: block;
    height: 14px;
    margin-top: 6px;
}
.review-card.is-skeleton .text .skeleton-line:first-child {
    margin-top: 0;
}
.review-card.is-skeleton .text .skeleton-line--short {
    width: 60%;
}
.review-card.is-skeleton .skeleton-line--about {
    width: 40%;
    height: 14px;
}
.review-card.is-skeleton .skeleton-line--link {
    width: 90px;
    height: 14px;
}
