/**
 * CC Popup - Front Office Styles
 */

/* Overlay - dark semi-transparent background */
.cc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup container */
.cc-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cc-popup-overlay.active .cc-popup-container {
    transform: scale(1) translateY(0);
}

/* Close button */
.cc-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

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

.cc-popup-close:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Popup image */
.cc-popup-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
}

/* Popup link wrapper */
.cc-popup-link {
    display: block;
    cursor: pointer;
}

.cc-popup-link:hover .cc-popup-image {
    opacity: 0.95;
}

/* Popup title (optional) */
.cc-popup-title {
    margin: 0;
    padding: 15px 20px;
    background-color: #ffffff;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cc-popup-container {
        max-width: 95%;
        margin: 10px;
        border-radius: 8px;
    }

    .cc-popup-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 8px;
        right: 8px;
    }

    .cc-popup-title {
        font-size: 16px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .cc-popup-container {
        max-width: 98%;
        margin: 5px;
    }

    .cc-popup-image {
        max-height: 70vh;
    }
}
