/* Mirror Preview — podgląd lustra na karcie produktu */

.mp-preview {
    margin: 0 0 22px;
    padding: 14px 16px 12px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fafafa;
}

.mp-preview[hidden] {
    display: none;
}

.mp-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mp-preview__title {
    font-weight: 600;
    font-size: 15px;
}

.mp-preview__toggle {
    padding: 4px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    color: inherit;
}

.mp-preview__toggle:hover {
    background: #f0f0f0;
}

.mp-preview__stage {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background: #12161c;
}

.mp-preview .mp-svg {
    display: block;
    width: 100%;
    max-width: 320px;
    max-height: 300px;
    height: auto;
}

.mp-preview .mp-glow,
.mp-preview .mp-ledline {
    transition: opacity 0.2s ease;
}

.mp-preview__colors {
    margin: 12px 0 0;
    text-align: center;
}

.mp-preview__colors[hidden] {
    display: none;
}

.mp-preview__colors-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #777;
}

.mp-preview__colors-buttons {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.mp-preview__colors button {
    padding: 5px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.mp-preview__colors button.is-active {
    border-color: #333;
    background: #333;
    color: #fff;
}

.mp-preview.is-modal .mp-preview__colors-label {
    color: #9aa4b0;
}

.mp-preview.is-modal .mp-preview__colors button {
    border-color: #444;
    background: transparent;
    color: #e8eef5;
}

.mp-preview.is-modal .mp-preview__colors button.is-active {
    border-color: #fff;
    background: #fff;
    color: #111;
}

.mp-preview__caption {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.mp-preview__disclaimer {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: #777;
    text-align: center;
}

/* Przycisk "Zamknij" ma sens tylko w popupie */
.mp-preview__close {
    display: none;
    margin: 14px auto 0;
    padding: 10px 26px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.mp-preview.is-collapsed .mp-preview__body {
    display: none;
}

/* Popup na telefonie — musi wygrywać z .is-collapsed, stąd kolejność */
.mp-preview.is-modal .mp-preview__body {
    display: flex;
    position: fixed;
    inset: 0;
    /* Motyw używa bardzo wysokich warstw: sticky pasek koszyka 9999999,
       własne modale (gpsr-modal, led-modal) 999999999 — musimy je przebić. */
    z-index: 999999999;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: #0b0e13;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mp-preview.is-modal .mp-preview__stage {
    background: transparent;
}

.mp-preview.is-modal .mp-svg {
    max-width: 100%;
    max-height: 55vh;
}

.mp-preview.is-modal .mp-preview__caption {
    color: #fff;
    font-size: 15px;
}

.mp-preview.is-modal .mp-preview__disclaimer {
    color: #9aa4b0;
}

.mp-preview.is-modal .mp-preview__close {
    display: block;
}

@media (max-width: 650px) {
    .mp-preview {
        padding: 12px;
    }

    .mp-preview .mp-svg {
        max-height: 220px;
    }
}
