/* Weiku Timeline */

/* Close button */
.weiku-timeline-close-btn:hover {
    background: #f26419;
    color: white;
}
.weiku-timeline-close-btn {
    position: absolute;
    right: -15px;
    top: -15px;
    font-size: 20px;
    cursor: pointer;
    background: white;
    border-radius: 100px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9e9e9;
}

/* Backdrop style */
.weiku-timeline-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Modal container */
.weiku-timeline-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    z-index: 20;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;        /* até 1336px de viewport */
    max-width: 1200px;
    overflow: visible; /* para botões de fechar extrapolarem sem corte */
}

/* Acima de 1336px fixa exatamente 1200px */
@media (min-width: 1336px) {
    .weiku-timeline-modal {
        width: 1200px;
    }
}

/* Modal content */
.weiku-timeline-modal-content {
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
    overflow-x: hidden;
}

/* Destaque: Imagem + Descrição */
.popup-descricao-item {
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 10px;
    font-size: 16px;
}

/* Imagem de destaque */
.weiku-timeline-modal-content-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

/* Gallery thumbnails */
.weiku-timeline-modal-content-gallery-item img {
    border-radius: 10px;
    height: 130px;
    width: 100%;
    object-fit: cover;
}

/* Força grid 2-colunas na galeria */
.weiku-timeline-modal-content .row.weiku-timeline-modal-content-gallery,
.weiku-timeline-modal-content .weiku-timeline-modal-content-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Close button */
.weiku-timeline-close-btn {
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 20px;
    cursor: pointer;
    background: white;
    border-radius: 100px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9e9e9;
    z-index: 9999;
}

.weiku-timeline-close-btn:hover {
    background: #f26419;
    color: white;
}

/* Utility class to hide elements */
.weiku-timeline-hidden {
    display: none;
}

/* Grid system (pode ser removido se usar Bricks Builder) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    gap: 2%;
}

[class^="col-"],
[class*=" col-"] {
    box-sizing: border-box;
}

/* Responsivo: col-md-* reconfigurado */
@media (min-width: 768px) {
    .col-md-8 {
        flex: 0 0 69%;
        max-width: 69%;
    }
    .col-md-4 {
        flex: 0 0 29%;
        max-width: 29%;
    }
}

/* Utility */
.d-none {
    display: none !important;
}

/* Loader */
#weikuTimelineModalLoader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}
#weikuTimelineModalLoader .loader {
    color: #f26419;
    display: inline-block;
    width: 80px;
    height: 80px;
    box-sizing: border-box;
}
#weikuTimelineModalLoader .loader:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6.4px solid currentColor;
    border-color: currentColor transparent currentColor transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover gallery */
.weiku-timeline-modal-content-gallery-item img:hover {
    cursor: pointer;
    opacity: 0.8;
}

/* Mobile (<768px) */
@media (max-width: 767px) {
    .weiku-timeline-modal-content-image img {
        max-height: 260px;
    }

    .weiku-timeline-modal {
        padding: 15px;
        width: 95%;
    }

    .weiku-timeline-modal-content-gallery-item img {
        height: 75px;
    }

    .weiku-timeline-modal-content .row.weiku-timeline-modal-content-gallery,
    .weiku-timeline-modal-content .weiku-timeline-modal-content-gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }

    #weikuTimelineModal > div.weiku-timeline-modal-content > div > div.col-12.col-md-4 {
        margin-top: 15px;
    }
}