/**
 * Estilos para el popup de Avísame cuando esté disponible
 */

/* Ventana modal */
.waitlist-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: waitlist-fadein 0.3s;
}

@keyframes waitlist-fadein {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Contenido del modal */
.waitlist-modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    animation: waitlist-slidein 0.3s;
}

@keyframes waitlist-slidein {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* Botón de cierre */
.waitlist-close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.waitlist-close:hover,
.waitlist-close:focus {
    color: #2fb5d2;
    text-decoration: none;
}

/* Título y descripción */
.waitlist-modal h2 {
    margin-bottom: 5px;
    font-size: 20px;
    color: #232323;
}

.waitlist-combination-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #2fb5d2;
}

.waitlist-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

/* Formulario */
.waitlist-form {
    margin-top: 15px;
}

.waitlist-form .form-group {
    margin-bottom: 15px;
}

.waitlist-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.waitlist-form .required {
    color: #ff0000;
}

.waitlist-form input[type="text"],
.waitlist-form input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.waitlist-form input[type="text"]:focus,
.waitlist-form input[type="email"]:focus {
    border-color: #2fb5d2;
    outline: none;
}

.waitlist-form input.is-invalid {
    border-color: #ff0000;
}

/* Grupo RGPD */
.gdpr-group {
    margin-top: 20px;
}

.gdpr-group .checkbox {
    display: flex;
    align-items: flex-start;
}

.gdpr-group input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

.gdpr-group label {
    font-weight: normal;
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

.gdpr-group a {
    color: #2fb5d2;
    text-decoration: underline;
}

/* Botones */
.waitlist-buttons {
    display: flex;
    margin-top: 20px;
    gap: 10px;
}

.waitlist-buttons button {
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.waitlist-buttons .waitlist-submit-btn {
    background-color: #2fb5d2;
    color: white;
    border: none;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.waitlist-buttons .waitlist-submit-btn:hover {
    background-color: #2592a9;
}

.waitlist-buttons .waitlist-cancel-btn {
    background-color: #f8f8f8;
    color: #666;
    border: 1px solid #ddd;
}

.waitlist-buttons .waitlist-cancel-btn:hover {
    background-color: #ececec;
}

/* Loader */
.waitlist-loader {
    display: inline-block;
    margin-left: 8px;
}

.waitlist-loader svg {
    animation: rotate 2s linear infinite;
}

.waitlist-loader .spinner {
    stroke-dasharray: 60, 150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Mensajes de error y éxito */
.waitlist-errors,
.waitlist-success {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.waitlist-errors {
    background-color: #ffd9d7;
    color: #c02b21;
    border-left: 3px solid #c02b21;
}

.waitlist-errors ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.waitlist-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 3px solid #155724;
}

/* Responsive */
@media (max-width: 576px) {
    .waitlist-modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 20px;
    }
    
    .waitlist-buttons {
        flex-direction: column;
    }
    
    .waitlist-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
}