/**
 * TOOOLS Popup Anuncio - Frontend Styles
 */

/* Overlay */
.toools-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Container */
.toools-popup-container {
    background: #fff;
    border-radius: 8px;
    max-width: 680px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.toools-popup-overlay.active .toools-popup-container {
    transform: scale(1);
}

/* Close Button - X con fondo circular semitransparente */
.toools-popup-close,
.toools-popup-close:hover,
.toools-popup-close:focus,
.toools-popup-close:active {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    background: rgba(128, 128, 128, 0.5) !important;
    background-color: rgba(128, 128, 128, 0.5) !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1 !important;
    aspect-ratio: 1 / 1 !important;
}

.toools-popup-close:hover,
.toools-popup-close:focus {
    background: rgba(100, 100, 100, 0.6) !important;
    background-color: rgba(100, 100, 100, 0.6) !important;
}

.toools-popup-close svg {
    width: 18px;
    height: 18px;
    color: #fff;
    stroke-width: 2.5;
}

/* Content Layout */
.toools-popup-content {
    display: flex;
    flex-direction: row;
}

/* Image Section */
.toools-popup-image {
    flex: 0 0 45%;
    max-width: 45%;
}

.toools-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 280px;
}

/* Info Section */
.toools-popup-info {
    flex: 1;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Title */
.toools-popup-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    line-height: 1.3;
    font-family: inherit;
    padding-right: 30px;
}

/* Meta info (date, time) */
.toools-popup-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #555;
    font-size: 15px;
    line-height: 1.4;
}

.toools-popup-meta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #777;
}

/* Menu List */
.toools-popup-list {
    margin: 18px 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.toools-popup-list li {
    margin-bottom: 6px;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

.toools-popup-list li:last-child {
    margin-bottom: 0;
}

/* Price / CTA */
.toools-popup-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 16px;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 768px) {
    .toools-popup-overlay {
        padding: 15px;
    }
    
    .toools-popup-container {
        max-width: 480px;
    }
    
    .toools-popup-content {
        flex-direction: column;
    }
    
    .toools-popup-image {
        flex: none;
        max-width: 100%;
        height: 200px;
    }
    
    .toools-popup-image img {
        min-height: auto;
        height: 100%;
    }
    
    .toools-popup-info {
        padding: 24px 20px;
    }
    
    .toools-popup-title {
        font-size: 21px;
        margin-bottom: 16px;
    }
    
    .toools-popup-close {
        top: 10px;
        right: 10px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .toools-popup-overlay {
        padding: 12px;
        align-items: flex-start;
        padding-top: 50px;
    }
    
    .toools-popup-container {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    .toools-popup-image {
        height: 180px;
    }
    
    .toools-popup-info {
        padding: 20px 16px;
    }
    
    .toools-popup-title {
        font-size: 19px;
        margin-bottom: 14px;
    }
    
    .toools-popup-meta {
        font-size: 14px;
    }
    
    .toools-popup-meta svg {
        width: 15px;
        height: 15px;
    }
    
    .toools-popup-list {
        margin: 14px 0;
        padding-left: 18px;
    }
    
    .toools-popup-list li {
        font-size: 14px;
    }
    
    .toools-popup-price {
        font-size: 15px;
        margin-top: 12px;
    }
    
    .toools-popup-close {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }
    
    .toools-popup-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Prevent body scroll when popup is open */
body.toools-popup-open {
    overflow: hidden;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .toools-popup-overlay,
    .toools-popup-container,
    .toools-popup-close {
        transition: none;
    }
}
