/* =============================================
   MSB Template Modal — myshadibiodata
   Style: myinvitations gallery popup
   ============================================= */

/* Overlay */
.msb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.msb-overlay.msb-active {
    opacity: 1;
    visibility: visible;
}

/* Modal container */
.msb-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 9999;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 900px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    overflow: visible;
}
.msb-modal.msb-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Top bar: share + close icons */
.msb-modal__topbar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}
.msb-modal__topbar button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 24px;
    text-align: center;
}
.msb-modal__close {
    border: 1px solid #000;
    background: #fff;
}
.msb-modal__close:hover {
    background: #f5f5f5;
    border-color: #333;
}
.msb-modal__close svg {
    width: 12px;
    height: 12px;
    stroke: #000;
    stroke-width: 2;
}
.msb-modal__share {
    border: 1px solid #D35458;
    background: #fff;
    color: #D35458;
}
.msb-modal__share:hover {
    background: #D35458;
    color: #fff;
    transform: scale(1.1);
}
.msb-modal__share svg {
    width: 12px;
    height: 12px;
}
.msb-modal__share:hover svg circle,
.msb-modal__share:hover svg path {
    stroke: #fff;
}

/* "XX people are online" counter */
.msb-modal__online {
    font-size: 14px;
    color: #313131;
    margin: 0 0 20px;
}
.msb-modal__online span {
    font-weight: 700;
    color: #D35458;
}

/* Inner layout: gallery left + info right */
.msb-modal__inner {
    display: flex;
    flex-direction: column;
}

/* Gallery area */
.msb-modal__gallery {
    display: flex;
    gap: 30px;
    padding: 40px 30px;
    justify-content: center;
    align-items: flex-start;
    background: #fff;
}
.msb-modal__gallery img {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}
/* Single image takes more space */
.msb-modal__gallery img:only-child {
    max-width: 55%;
    max-height: 70vh;
    flex: none;
}

/* Splide carousel — works at all screen sizes */
/* Core Splide rules scoped to modal only (avoid loading splide-core.min.css globally) */
.msb-modal__gallery.msb-splide {
    display: block;
    padding: 40px 0;
    position: relative;
}
.msb-modal__gallery.msb-splide .splide__track {
    overflow: hidden;
    position: relative;
}
.msb-modal__gallery.msb-splide .splide__list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
.msb-modal__gallery.msb-splide .splide__slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.msb-modal__gallery.msb-splide .splide__slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}
/* Pagination dots */
.msb-modal__gallery.msb-splide .splide__pagination {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 1;
}
.msb-modal__gallery.msb-splide .splide__pagination__page {
    width: 10px;
    height: 10px;
    background: #f2f2f2;
    opacity: 1;
    margin: 0 2.5px;
    border-radius: 50%;
    transition: all .3s ease;
}
.msb-modal__gallery.msb-splide .splide__pagination__page.is-active {
    background: #BFBFBF;
    width: 35px;
    border-radius: 5px;
}

/* Info area */
.msb-modal__info {
    padding: 1.5rem 2rem 2rem;
}
.msb-modal__title {
    font-size: 24px;
    font-weight: 500;
    color: #000;
    margin: 0 0 10px;
    line-height: 1.3;
    padding-right: 2rem;
}

/* Feature list */
.msb-modal__features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}
.msb-modal__features li {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #313131;
    margin-bottom: 5px;
}
.msb-modal__features li svg {
    flex-shrink: 0;
}

/* Action buttons */
.msb-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 20px;
}
.msb-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid #D35458;
    transition: all 0.2s ease;
    line-height: 1.4;
    white-space: nowrap;
}
.msb-modal__btn:hover {
    opacity: 0.9;
}
.msb-modal__btn--primary {
    background: #D35458;
    color: #fff;
}
.msb-modal__btn--secondary {
    background: #D35458;
    color: #fff;
}

/* ---- Desktop: side-by-side layout (mirrors MBM row-container style) ---- */
@media only screen and (min-width: 768px) {
    .msb-modal {
        max-width: calc(100% - 10%);
        overflow: visible;
        padding: 80px 30px;
    }
    .msb-modal__inner {
        flex-direction: row;
        align-items: flex-start;
    }
    .msb-modal__gallery {
        width: 60%;
        flex-shrink: 0;
        padding: 0;
        overflow: visible;
    }
    .msb-modal__info {
        width: 40%;
        padding: 0 0 0 10px;
        display: flex;
        flex-direction: column;
    }
}

/* ---- Mobile ---- */
@media only screen and (max-width: 767px) {
    .msb-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .msb-modal__info {
        padding: 1rem 1.25rem 1.5rem;
    }
    .msb-modal__title {
        font-size: 1rem;
    }
    .msb-modal__actions {
        flex-direction: column;
    }
    .msb-modal__btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   Copy / Share Toast
   ═══════════════════════════════════════════════════════════ */
.msb-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.msb-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
