.wp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.wp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.wp-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
}

.wp-modal-container.has-image .wp-modal-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.wp-modal-container.has-image .wp-modal-text {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 30px;
    overflow-y: auto;
    max-height: 80vh;
}

.wp-modal-container.no-image {
    width: 80%;
    max-width: 600px;
}

.wp-modal-container.no-image .wp-modal-text {
    padding: 40px;
    overflow-y: auto;
    max-height: 80vh;
}

.wp-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wp-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    color: #555;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.wp-modal-close:hover {
    color: #000;
    background: #fff;
    transform: rotate(90deg);
}

.wp-modal-content {
    display: flex
}

.wp-modal-footer {
    margin-top: 25px;
    text-align: center;
}

.wp-modal-close-button {
    padding: 12px 25px;
    background: #4a4a4a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.wp-modal-close-button:hover {
    background: #2c2c2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Animazione di apertura */
.wp-modal-container {
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .wp-modal-container.has-image {
        flex-direction: column;
        width: 95%;
        max-height: 95vh;
    }
    
    .wp-modal-container.has-image .wp-modal-image,
    .wp-modal-container.has-image .wp-modal-text {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .wp-modal-container.has-image .wp-modal-image {
        height: 200px;
    }
    
    .wp-modal-container.no-image {
        width: 95%;
    }
    
    .wp-modal-text {
        padding: 20px !important;
    }
}