/* Contenedor principal responsive */
.faq-live-search-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Input responsive */
.faq-live-search-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Caja resultados */
.faq-live-search-results {
    margin-top: 5px;
    border: 1px solid var(--wp--preset--color--secondary-20);
    border-radius: 8px;
    padding: 10px 0px;
}

/* Cada resultado */
.faq-result-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.faq-result-item:last-child {
    border-bottom: none;
}

/* Título */
.faq-result-title {
    margin: 0;
    padding: 12px;
    font-size: 18px;
    cursor: pointer;
    color: var(--wp--preset--color--alternative-2) !important;
}

/* Respuesta oculta con animación */
.faq-result-content {
    display: block;
    padding: 0px 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    line-height: 1.5;
    font-size: 15px;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

/* Desktop: mostrar en hover */
@media (hover: hover) and (pointer: fine) {
    .faq-result-item:hover .faq-result-title {
        background: var(--wp--preset--color--pink-pastel) !important;
        opacity: 1;
    }
    .faq-result-item:hover .faq-result-content {
        max-height: 300px;
        opacity: 1;
        margin-top: 8px;
        overflow-y: auto; /* Activa scroll vertical solo si es necesario */
    }
}

/* Móvil: mostrar por click */

.faq-result-content.is-open {
    max-height: 300px;
    opacity: 1;
    margin-top: 8px;
    overflow-y: auto; /* Activa scroll vertical solo si es necesario */
}

/* Responsive */
@media (max-width: 768px) {
    .faq-live-search-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }

    .faq-live-search-input {
        font-size: 15px;
        padding: 12px;
    }

    .faq-result-title {
        font-size: 16px;
    }

    .faq-result-content {
        font-size: 14px;
    }
}