/**
 * AdsXS Modal CSS
 * 
 * Estilos para el botón vertical y el modal deslizante.
 */

.open-button {
    position: fixed;
    left: -30px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    background: linear-gradient(135deg, #00acee, #c9ff3c);
    color: white;
    border: none;
    padding: 10px 15px 1px 15px;
    cursor: pointer;
    border-radius: 0px 0px 5px 5px;
    font-size: 17px;
    transition: all 0.3s ease;
    z-index: 20001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: auto;
    white-space: nowrap;
    font-family: Arial, sans-serif;
    text-transform: none;
    animation: attentionGrab 5s ease-in-out infinite;
    outline: none;
    opacity: 1;
    visibility: visible;
}

.open-button:active {
    outline: none;
    border: none;
    color: white;
    transform: translateY(-50%) rotate(-90deg);
}

.open-button.active {
    background: linear-gradient(135deg, #c9ff3c, #00acee); 
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    transform: translateY(-50%) rotate(-90deg); 
    animation-play-state: paused;
}

.open-button.active:active {
    background: linear-gradient(135deg, #c9ff3c, #00acee); 
}
 
.open-button.button-visible {
    left: -30px;
    opacity: 1;
    visibility: visible;
}

.open-button strong, .open-button .xs {
    display: inline;
    font-family: Arial, sans-serif;
    text-transform: none;
    color: white;
}

.open-button strong {
    font-weight: 800;
}

.open-button .xs {
    font-weight: 300;
    opacity: 0.8;
}

.open-button:hover {
    background: linear-gradient(135deg, #00acee, #c9ff3c);
    color: white;
    transform: translateY(-50%) rotate(-90deg) translateX(2px);
    animation-play-state: paused;
}

.open-button:focus {
    outline: none;
    border: none;
    background: linear-gradient(135deg, #00acee, #c9ff3c);
    color: white;
    transform: translateY(-50%) rotate(-90deg);
}

@keyframes attentionGrab {
    0%, 100% {
        transform: translateY(-50%) rotate(-90deg);
    }
    20% {
        transform: translateY(-50%) rotate(-90deg) translateX(5px);
    }
    40% {
        transform: translateY(-50%) rotate(-90deg);
    }
    60% {
        transform: translateY(-50%) rotate(-90deg) translateY(5px);
    }
    80% {
        transform: translateY(-50%) rotate(-90deg) translateY(-5px);
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 20000;
    align-items: center; 
    justify-content: flex-start;
}

.modal-content {
    width: 0;
    max-width: 98%;
    height: 96%; 
    background: white;
    position: relative; 
    left: 0; 
    top: auto; 
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    animation: slideIn 0.5s ease-out forwards;
    box-shadow: 0 4px 25px rgba(0,0,0,0.25);
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.modal.show {
    display: flex;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 95%;
        opacity: 1;
    }
}

.modal-content.closing {
    animation: slideOut 0.5s ease-in forwards;
}

@keyframes slideOut {
    from {
        width: 95%;
        opacity: 1;
    }
    to {
        width: 0;
        opacity: 0;
    }
}

.modal iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

#adsxs-consent-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 400px;
    padding: 0;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.adsxs-consent-content {
    padding: 20px;
}

.adsxs-consent-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.adsxs-consent-content p {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
}

.adsxs-consent-content a {
    color: #00acee;
    text-decoration: none;
}

.adsxs-consent-content a:hover {
    text-decoration: underline;
}

.adsxs-consent-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.adsxs-btn {
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
}

#adsxs-accept {
    background: linear-gradient(135deg, #00acee, #c9ff3c);
    color: white;
}

#adsxs-accept:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

#adsxs-reject {
    background: #f1f1f1;
    color: #333;
}

#adsxs-reject:hover {
    background: #e4e4e4;
}

@media (max-width: 768px) {
    .modal-content {
        width: 0;
        max-width: 98%;
        height: 96%;
        left: 0;
        /* Eliminamos el top: 0 */
        animation: slideInMobile 0.5s ease-out forwards;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
    
    @keyframes slideInMobile {
        from {
            width: 0;
            opacity: 0;
        }
        to {
            width: 92%;
            opacity: 1;
        }
    }
    
    @keyframes slideOutMobile {
        from {
            width: 92%;
            opacity: 1;
        }
        to {
            width: 0;
            opacity: 0;
        }
    }
    
    .modal-content.closing {
        animation: slideOutMobile 0.5s ease-in forwards;
    }
    
    #adsxs-consent-notice {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
}