/**
 * Story Server Frontend Styles
 */

.story-matrix {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 1.5em 0;
    max-width: 100%;
}

.story-matrix a {
    display: block;
    line-height: 0;
}

.story-matrix.visual-matrix {
    gap: 8px;
}

.story-matrix.visual-matrix img.story-stub {
    width: var(--story-stub-width, 100px);
    height: var(--story-stub-width, 100px);
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.story-matrix.visual-matrix a:hover img.story-stub {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

.story-matrix.visual-matrix a.current-item img {
    outline: 3px solid #ffcc00;
    outline-offset: -3px;
}

.story-matrix img.PokerFace {
    display: block;
    width: 7px;
    height: 7px;
    border: none;
    padding: 0;
    margin: 0;
}

/* Pictorial TOC (PicTOC) */
.story-pictoc-row {
    display: flex;
    align-items: center;
    margin-bottom: 2em;
    gap: 20px;
    background: #fff;
}

.story-pictoc-row:nth-child(even) {
    flex-direction: row-reverse;
}

.story-pictoc-img {
    flex: 0 0 120px;
    text-align: center;
}

.story-pictoc-img img {
    width: 100px;
    height: auto;
    border: 1px solid #ccc;
    padding: 2px;
    background: #fff;
    display: inline-block;
}

.story-pictoc-text {
    flex: 1;
    padding: 10px;
}

.story-pictoc-text h5 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #333;
}

.story-pictoc-row:nth-child(even) .story-pictoc-text {
    text-align: right;
}

@media (max-width: 600px) {
    .story-pictoc-row, .story-pictoc-row:nth-child(even) {
        flex-direction: column;
        text-align: center !important;
    }
    .story-pictoc-text {
        text-align: center !important;
    }
}


.story-matrix .current-dot {
    display: block;
    width: 7px;
    height: 7px;
}
