/* Estilos Modal Clásico */
.smart-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 99999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smart-popup-overlay.is-active {
    display: flex;
    opacity: 1;
}

.smart-popup-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.smart-popup-overlay.is-active .smart-popup-container {
    transform: translateY(0);
}

/* Modo Imagen Limpia */
.smart-popup-overlay.smart-popup-image-only .smart-popup-container {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    max-width: fit-content;
    width: auto;
}

.smart-popup-overlay.smart-popup-image-only .smart-popup-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.smart-popup-overlay.smart-popup-image-only .smart-popup-close {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -12px;
    right: -12px;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    padding: 0;
}
.smart-popup-overlay.smart-popup-image-only .smart-popup-close:hover {
    background: #000;
}

.smart-popup-overlay[data-position="bottom-right"] { justify-content: flex-end; align-items: flex-end; padding: 20px; }
.smart-popup-overlay[data-position="bottom-left"] { justify-content: flex-start; align-items: flex-end; padding: 20px; }
.smart-popup-overlay[data-position="top-bar"] { align-items: flex-start; padding: 0; }
.smart-popup-overlay[data-position="top-bar"] .smart-popup-container { max-width: 100%; width: 100%; border-radius: 0; }

/* Botones de Cierre (X simple justa a los bordes con padding de 5px) */
.smart-popup-container,
.smart-toast-card {
    position: relative;
}

.smart-popup-close,
.smart-toast-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 5px;
    z-index: 10;
}
.smart-popup-close:hover,
.smart-toast-close:hover {
    opacity: 0.7;
}

/* Estilos Comunes de Toast Card (Mini Notificaciones Flotantes Arriba y Abajo) */
.smart-toast-card {
    background: #ffffff;
    padding: 16px 24px 16px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 360px;
    position: relative;
    border-left: 4px solid #3483fa;
    font-family: inherit;
}

/* Toast Abajo (Product Toast) */
.smart-popup-toast-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.smart-popup-toast-wrapper.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.smart-toast-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.smart-toast-img img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.smart-toast-info {
    flex: 1;
}

.smart-toast-urgency {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.smart-toast-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.2;
}



.smart-toast-link {
    display: inline-block;
    margin-top: 6px;
    background-color: #3483fa;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.smart-toast-link:hover {
    background-color: #2968c8;
    text-decoration: none;
}

/* Toast Arriba (Top Toast / Urgency Banner with Icon) */
.smart-popup-top-toast-wrapper {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99999;
    display: none;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.smart-popup-top-toast-wrapper.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.smart-toast-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.smart-toast-icon-badge {
    box-sizing: border-box;
}
.smart-toast-icon-badge svg {
    width: 55%;
    height: 55%;
    display: block;
}

.smart-toast-content {
    flex: 1;
    padding-right: 15px;
}

.smart-toast-content p {
    margin: 0 0 6px 0;
}
.smart-toast-content p:last-child {
    margin-bottom: 0;
}

/* Responsive General por Defecto para Celulares */
@media (max-width: 768px) {
    .smart-popup-top-toast-wrapper,
    .smart-popup-toast-wrapper {
        left: 10px;
        right: 10px;
        width: auto !important;
    }
    .smart-toast-card {
        width: 100% !important;
        box-sizing: border-box;
        padding: 14px 20px 14px 14px;
    }
}
