/* ===================================
   Rebranding Popup Extension
   =================================== */

/* Overlay — full-screen backdrop with blur */
.rebranding-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    cursor: pointer;
}

.rebranding-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Popup container */
.rebranding-popup {
    position: relative;
    max-width: 750px;
    max-height: 85vh;
    width: auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease;
    cursor: default;
}

.rebranding-overlay.is-visible .rebranding-popup {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.rebranding-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rebranding-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Single popup image via <picture> element */
.rebranding-popup picture {
    display: block;
    line-height: 0;
}

.rebranding-popup picture img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 16px;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .rebranding-overlay {
        padding: 12px;
    }

    .rebranding-popup {
        max-width: 100%;
        width: 100%;
        border-radius: 12px;
    }

    .rebranding-popup picture img {
        border-radius: 12px;
    }

    .rebranding-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}
