/* WW Stories — виджет превью. Всё с префиксом ww-story-, чужие стили не перехватываем. */

.ww-story-wrap {
    margin: 0 0 1.5em;
}

.ww-story-widget {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ww-story-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ww-story-circle,
ul.ww-story-widget li.ww-story-item a.ww-story-circle {
    display: block;
    width: var(--ww-story-size, 70px);
    height: var(--ww-story-height, var(--ww-story-size, 70px));
    border-radius: var(--ww-story-radius, 50%);
    border: 3px solid var(--ww-story-color, #7a1fa2);
    padding: 3px;
    overflow: hidden;
    box-sizing: border-box;
    text-decoration: none;
}

/* Селектор с запасом и !important, чтобы темы вида
   .entry-content img { height:auto } не мешали растяжке */
.ww-story-circle img,
ul.ww-story-widget li.ww-story-item a.ww-story-circle img,
.ww-story-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit;
    display: block;
}

.ww-story-caption {
    margin-top: 5px;
    font-size: var(--ww-story-cap-size, 13px) !important;
    font-weight: var(--ww-story-cap-weight, 400) !important;
    color: var(--ww-story-cap-color, inherit) !important;
    line-height: 1.3;
    text-align: center;
    max-width: calc(var(--ww-story-size, 70px) * 1.6);
}

.ww-story-title {
    margin: 0 0 10px;
    font-size: var(--ww-story-title-size, 16px);
    font-weight: var(--ww-story-title-weight, 600);
    color: var(--ww-story-title-color, inherit);
}
