/* CSS para LabStory */

:root {
    /* As cores são definidas dinamicamente via PHP no HTML principal */
}

.labstory-stories-plugin-container {
    font-family: var(--labstory-primary-font, "Helvetica, Arial, sans-serif");
}

.labstory-carousel-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.labstory-carousel-container::-webkit-scrollbar {
    display: none; /* WebKit */
}

.labstory-story-item {
    margin-right: 15px;
    text-align: center;
    cursor: pointer;
}

.labstory-story-item:last-child {
    margin-right: 0;
}

.labstory-story-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--labstory-primary-color, #0073aa); /* Fallback color */
    padding: 2px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.labstory-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.labstory-story-title-snippet {
    font-size: 12px;
    color: #262626;
    margin-top: 5px;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Estilos para o Lightbox */
.labstory-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.labstory-lightbox-content {
    position: relative;
    padding: 0;
    width: min(90vw, 400px);
    max-width: 400px;
    height: min(95vh, 700px);
    max-height: 700px;
    background-color: #000;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.labstory-lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1002;
    padding: 5px 10px;
    transition: color 0.3s;
}

.labstory-lightbox-close-btn:hover {
    color: #ccc;
}

.labstory-lightbox-story-view {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.labstory-lightbox-story-view img.labstory-story-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.labstory-lightbox-story-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    box-sizing: border-box;
    z-index: 1002;
}

.labstory-lightbox-story-info .labstory-story-link {
    text-decoration: none; /* Remove sublinhado do link */
    display: block; /* Faz o link ocupar o espaço do título e descrição */
}

.labstory-lightbox-story-info h3.labstory-story-title-lightbox {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--labstory-lightbox-title-color, #FFFFFF);
    font-weight: bold;
}

.labstory-lightbox-story-info p.labstory-story-excerpt {
    font-size: 14px;
    margin: 0 0 15px 0;
    max-height: 60px;
    overflow: hidden;
    line-height: 1.4;
    color: var(--labstory-lightbox-excerpt-color, #FFFFFF);
}

.labstory-lightbox-read-article-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--labstory-button-bg-color, #FFFFFF);
    color: var(--labstory-button-text-color, #000000);
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
    position: relative;
    z-index: 1003;
}

.labstory-lightbox-read-article-btn:hover {
    opacity: 0.9;
}

/* Indicadores de progresso */
.labstory-progress-bar-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 3px;
    z-index: 1001;
}

.labstory-progress-bar {
    flex-grow: 1;
    height: 2.5px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.labstory-progress-bar-inner {
    height: 100%;
    background-color: #fff;
    width: 0%;
    border-radius: 2px;
}

/* Navegação por toque/clique no lightbox */
.labstory-nav-area {
    position: absolute;
    top: 0;
    height: 100%;
    width: 30%;
    cursor: pointer;
    z-index: 1001;
}

.labstory-nav-prev {
    left: 0;
}

.labstory-nav-next {
    right: 0;
}

@media (max-width: 480px) {
    .labstory-lightbox-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .labstory-lightbox-story-view {
        border-radius: 0;
    }

    .labstory-lightbox-story-info {
        padding: 18px;
    }

    .labstory-lightbox-story-info h3.labstory-story-title-lightbox {
        font-size: 18px;
    }
}
