/* ---------------------------------------------------------------------------
 * Model page — redesigned header + horizontal-scroll tab strip
 * Palette tokens are CV-existing only (#161616, #1c1c1c, #252525, #515151,
 * #a30000, #900000, #e6e6e6, #b2b2b2, #868686, #00a8c0, etc.)
 * --------------------------------------------------------------------------- */

.model-info
{
    background: #1c1c1c;
    border: 1px solid #515151;
    border-radius: 4px;
    padding: 16px;
    color: #e6e6e6;
}

.model-info .mp-flex
{
    display: flex;
    gap: 16px;
    /* Stretch lets the avatar column match the info column's height so the
       image can size off it (height: 100%, width auto). */
    align-items: stretch;
}

.model-info .model-img
{
    flex: 0 0 auto;
    align-self: stretch;
    /* No fixed width — the img inside dictates the column width via its
       natural aspect ratio at the available height. */
    display: flex;
    align-items: center;
}

.model-info .model-img img
{
    height: 100%;
    width: auto;
    max-width: 240px;
    border: 1px solid #515151;
    display: block;
    object-fit: cover;
}

.model-info .mp-info
{
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.model-info .mp-name-row
{
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.model-info h3.model-name,
.model-info .model-name
{
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #e6e6e6;
    border-bottom: 0;
}

.model-info .model-name small
{
    color: #868686;
    font-size: 0.6em;
    margin-left: 4px;
}

.model-info .mp-status-row
{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.model-info .mp-pill
{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #444343;
    color: #b2b2b2;
    line-height: 1.4;
}
.model-info .mp-pill.online    { background: #006b0a; color: #fff; }
.model-info .mp-pill.offline   { background: #444343; color: #b2b2b2; }
.model-info .mp-pill.recording,
.model-info .mp-pill.public    { background: #a10000; color: #fff; }
.model-info .mp-pill.ondemand  { background: #840000; color: #fff; }
.model-info .mp-pill.vr        { background: #6d3d00; color: #fff; }

.model-info .mp-stats
{
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #868686;
}
.model-info .mp-stats .stat
{
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.model-info .mp-stats .stat strong
{
    color: #e6e6e6;
    font-weight: 600;
}

.model-info .mp-tags
{
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.model-info .mp-actions
{
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin-top: 4px;
}

.model-info .mp-actions .btn
{
    width: 100%;
    text-align: center;
}

/* Mobile: stack avatar on top, info below. The avatar reverts to a
   full-width tile with a capped height since stretching off the info
   column would mean the image fills the whole viewport. */
@media (max-width: 767px)
{
    .model-info .mp-flex
    {
        flex-direction: column;
        align-items: stretch;
    }
    .model-info .model-img
    {
        flex: 0 0 auto;
        align-self: stretch;
        width: 100%;
        display: block;
    }
    .model-info .model-img img
    {
        width: 100%;
        height: auto;
        max-width: none;
        max-height: 320px;
        object-fit: cover;
    }
    .model-info h3.model-name,
    .model-info .model-name
    {
        font-size: 1.2em;
    }
}

/* ---------- Tab strip ---------- */

.mp-tabs
{
    position: relative;
    border-bottom: 1px solid #515151;
    margin-top: 20px;
}

.mp-tabs-scroll
{
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.mp-tabs-scroll::-webkit-scrollbar { display: none; }

.mp-tabs > .mp-tabs-scroll > li
{
    list-style: none;
    flex: 0 0 auto;
}

.mp-tab
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: #b2b2b2;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
    border-top: 2px solid transparent;
    border-bottom: 0;
    margin-bottom: -1px;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.mp-tab:hover
{
    color: #e6e6e6;
    background-color: rgba(255, 255, 255, 0.04);
    border-top-color: #515151;
    text-decoration: none;
}
.mp-tab:focus,
.mp-tab:focus-visible,
.mp-tab:active
{
    /* Replace the default chunky browser outline with a CV-red inner ring
       that doesn't blow out the layout. Bootstrap's `a:focus` rule (0,1,1)
       outranks `.mp-tab` (0,1,0), so the outline must be killed here at
       the same specificity tier as the focus state itself. */
    color: #e6e6e6;
    text-decoration: none;
    outline: none !important;
    outline-offset: 0;
    box-shadow: inset 0 0 0 1px #a30000;
}
.mp-tabs > .mp-tabs-scroll > li.active > .mp-tab,
.mp-tabs > .mp-tabs-scroll > li.active > .mp-tab:hover,
.mp-tabs > .mp-tabs-scroll > li.active > .mp-tab:focus
{
    color: #e6e6e6;
    background-color: #1c1c1c;
    border-color: #515151;
    border-top-color: #a30000;
    border-radius: 3px 3px 0 0;
    box-shadow: none;
}
.mp-tab i { color: #868686; transition: color 150ms ease; }
.mp-tab:hover i { color: #b2b2b2; }
.mp-tabs > .mp-tabs-scroll > li.active > .mp-tab i { color: #e6e6e6; }
/* Gold star wins everywhere — including on the active tab where the
   parent rule above would otherwise repaint it #e6e6e6. Specificity
   matched to the active rule so it overrides cleanly. */
.mp-tab .fa-star,
.mp-tab:hover .fa-star,
.mp-tabs > .mp-tabs-scroll > li.active > .mp-tab .fa-star
{
    color: gold;
}

.mp-tabs::before, .mp-tabs::after
{
    content: '';
    position: absolute;
    top: 0;
    bottom: 1px;
    width: 28px;
    pointer-events: none;
    z-index: 1;
}
.mp-tabs::before
{
    left: 0;
    background: linear-gradient(to right, #252525, transparent);
}
.mp-tabs::after
{
    right: 0;
    background: linear-gradient(to left, #252525, transparent);
}

/* ---------- Animations ----------
 * Tab pane fade-in fires every time .active toggles onto a pane —
 * covers both Bootstrap tab swaps and lazy-load HTML injection
 * (the pane re-renders, .active stays, but the keyframe re-fires
 * because we re-assign animation-name via class re-match isn't a
 * thing — so we use a short keyframe that runs once on activation).
 */
@keyframes mp-pane-in
{
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0);   }
}
.tab-content > .tab-pane.active
{
    animation: mp-pane-in 220ms ease-out;
}

/* Pills: subtle hover lift + transitions on bg/colour */
.model-info .mp-pill
{
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

/* Tag chips: hover transition for the gallery tag colour change */
.model-info .mp-tags > .video-tag
{
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.model-info .mp-tags > .video-tag:hover
{
    transform: translateY(-1px);
    text-decoration: none;
}

/* Action buttons: smooth hover + active-press feedback */
.model-info .mp-actions .btn
{
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}
.model-info .mp-actions .btn:hover
{
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.model-info .mp-actions .btn:active
{
    transform: translateY(0);
    box-shadow: none;
}

/* Avatar: gentle fade-in on first load */
.model-info .model-img img
{
    transition: filter 200ms ease;
}

/* Stat strip values: brief glow when first painted (matches tab fade) */
.model-info .mp-stats .stat strong
{
    transition: color 180ms ease;
}

/* Rate-stars: keep the existing 200ms transition but let the gold
   highlight ease in slightly faster for a snappier hover feel. */
.rate-stars > ul > li
{
    transition: color 150ms ease, transform 150ms ease;
}
.rate-stars > ul > li:hover
{
    transform: scale(1.08);
}

/* Lazy-tab spinner: fade in instead of popping. */
.lazy-tab-spinner
{
    animation: mp-pane-in 220ms ease-out;
}

/* ---------- Existing rules preserved ---------- */

.model-sessions
{
    list-style: none;
    position: relative;
}

.model-sessions:before
{
    content: ' ';
    background: #373737;
    display: inline-block;
    position: absolute;
    left: 29px;
    width: 2px;
    height: 100%;
    z-index: 400;
}

.model-sessions li
{
    padding-left: 20px;
    padding-bottom: 5px;
}

.model-sessions > li:before
{
    display: inline-block;
    content: ' ';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #989898;
    border: 3px solid #585555;
    position: absolute;
    left: 20px;
    z-index: 400;
}

.model-sessions > li > .session-title { display: block; }
.model-sessions > li > .session-detail { display: block; color: #7c7c7c; }
.model-sessions > li > .session-videos { margin-top: 10px; }

.tab-pane
{
    padding-top: 20px;
}

.label
{
    display: inline-block;
    padding: 0.4em 0.6em 0.5em;
}

/* Rating stars */
.rate-stars > ul { padding: 0 0 5px; margin: 0; list-style: none; }
.rate-stars.full > ul { width: 100%; }
.rate-stars.full > ul > li { width: 20%; text-align: center; position: relative; }
.rate-stars.full > ul > li > i:before { z-index: 2; position: relative; }
.rate-stars.full > ul > li:before
{
    content: ' ';
    position: absolute;
    top: 50%;
    margin-top: -1.5px;
    left: 0;
    width: 100%;
    background-color: #383737;
    height: 3px;
    z-index: 1;
}
.rate-stars > ul > li
{
    display: inline-block;
    color: #4a4a4a;
    transition: color ease-in-out 200ms;
}
.rate-stars > ul > li:hover { cursor: pointer; }
.rate-stars > ul > li.high { color: gold; }
.rate-stars .fa-star { font-size: 1.5em; }
.rate-stars .rate-message { text-align: center; font-style: italic; color: #868686; }
.rate-stars .rate-title { font-size: 1.1em; margin-bottom: 10px; text-align: center; }
