/*
 * MV Collector Gallery
 * Popup
 */

body.mvcg-popup-open {
    overflow: hidden;
}

.mvcg-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.mvcg-popup.mvcg-open {
    display: block;
}

.mvcg-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    cursor: pointer;
}

.mvcg-popup-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1200px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f6f6f6;
    border: 2px solid #d97a00;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.mvcg-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #444;
    font-size: 28px;
    line-height: 38px;
    cursor: pointer;
    z-index: 20;
    transition: .2s;
}

.mvcg-popup-close:hover {
    background: #d97a00;
    color: #fff;
}

.mvcg-popup-content {
    display: grid;
    grid-template-columns: minmax(300px, 55%) minmax(280px, 45%);
    gap: 24px;
    padding: 25px;
    overflow: auto;
}

.mvcg-popup-image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.mvcg-popup-image img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    height: auto;
    border: 1px solid #cfcfcf;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.mvcg-popup-details {
    display: flex;
    flex-direction: column;
}

.mvcg-popup-details h2 {
    margin: 0 0 18px;
    padding-bottom: 10px;
    font-size: 1.6rem;
    border-bottom: 3px solid #d97a00;
}

.mvcg-popup-table {
    width: 100%;
    border-collapse: collapse;
}

.mvcg-popup-table th,
.mvcg-popup-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    vertical-align: top;
}

.mvcg-popup-table th {
    width: 130px;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
}

.mvcg-popup-description {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #d97a00;
    line-height: 1.6;
}

.mvcg-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 20px;
    background: #ececec;
    border-top: 1px solid #d0d0d0;
}

.mvcg-popup-footer button {
    padding: 9px 16px;
    border: 1px solid #bbb;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: .2s;
}

.mvcg-popup-footer button:hover {
    background: #d97a00;
    border-color: #d97a00;
    color: #fff;
}

.mvcg-popup-prev,
.mvcg-popup-next {
    font-size: 22px;
    font-weight: bold;
    min-width: 44px;
}

@media (max-width: 900px) {

    .mvcg-popup-window {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .mvcg-popup-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .mvcg-popup-image img {
        max-height: 50vh;
    }

    .mvcg-popup-footer {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {

    .mvcg-popup-content {
        padding: 15px;
    }

    .mvcg-popup-details h2 {
        font-size: 1.25rem;
    }

    .mvcg-popup-table th,
    .mvcg-popup-table td {
        display: block;
        width: 100%;
        padding: 6px 0;
    }

    .mvcg-popup-table tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #e5e5e5;
    }
}