/* Estilos para el shortcode de Sella FAQ */

.sella-faq-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sella-faq-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
    text-align: center;
}

.sella-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sella-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sella-faq-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.sella-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
}

.sella-faq-question h3,
.sella-faq-question h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748 !important;
    line-height: 1.4;
    padding-right: 20px;
}
.sella-faq-question h3 a,
.sella-faq-question h4 a {
    color: #2d3748 !important;
}

.sella-faq-icon {
    font-size: 24px;
    font-weight: 300;
    color: #a0aec0;
    transition: transform 0.3s ease;
    line-height: 1;
}

.sella-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
}

.sella-faq-content {
    padding: 0 24px 20px;
    color: #4a5568 !important;
    font-size: 15px;
    line-height: 1.6;
}
.sella-faq-content *, .sella-faq-content p {
    color: #4a5568 !important;
}

.sella-faq-content p {
    margin-bottom: 12px;
    color: #4a5568 !important;
}
.sella-faq-content p:last-child {
    margin-bottom: 0;
}

/* Estado activo */
.sella-faq-item.active {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.sella-faq-item.active .sella-faq-question h3,
.sella-faq-item.active .sella-faq-question h4,
.sella-faq-item.active .sella-faq-question h3 a,
.sella-faq-item.active .sella-faq-question h4 a {
    color: #1d4ed8 !important;
}

.sella-faq-item.active .sella-faq-icon {
    transform: rotate(45deg);
    color: #3b82f6;
}

.sella-faq-item.active .sella-faq-answer {
    max-height: 500px; /* Suficiente para la mayoría de respuestas */
}

/* Tabs and Scrollbox */
.sella-faq-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    -webkit-overflow-scrolling: touch;
}

.sella-faq-tabs::-webkit-scrollbar {
    display: none;
}

.sella-faq-tab {
    background: #f1f5f9;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sella-faq-tab:hover {
    background: #e2e8f0;
}

.sella-faq-tab.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.sella-faq-scrollbox {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    overscroll-behavior: contain;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sella-faq-scrollbox::-webkit-scrollbar {
    width: 6px;
}
.sella-faq-scrollbox::-webkit-scrollbar-track {
    background: transparent;
}
.sella-faq-scrollbox::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.sella-faq-readmore {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}
.sella-faq-readmore:hover {
    text-decoration: underline;
}

/* Modo oscuro opcional */
@media (prefers-color-scheme: dark) {
    .sella-faq-title {
        color: #f1f5f9;
    }
    .sella-faq-item {
        background: #1e293b;
        border-color: #334155;
    }
    .sella-faq-question {
        background: #1e293b;
    }
    .sella-faq-question h3,
    .sella-faq-question h4,
    .sella-faq-question h3 a,
    .sella-faq-question h4 a {
        color: #e2e8f0 !important;
    }
    .sella-faq-answer {
        background: #0f172a;
    }
    .sella-faq-content {
        color: #94a3b8 !important;
    }
    .sella-faq-content *, .sella-faq-content p {
        color: #94a3b8 !important;
    }
    .sella-faq-item.active {
        border-color: #3b82f6;
    }
    .sella-faq-item.active .sella-faq-question h3,
    .sella-faq-item.active .sella-faq-question h4,
    .sella-faq-item.active .sella-faq-question h3 a,
    .sella-faq-item.active .sella-faq-question h4 a {
        color: #60a5fa !important;
    }
    .sella-faq-tab {
        background: #334155;
        color: #cbd5e1;
    }
    .sella-faq-tab:hover {
        background: #475569;
    }
    .sella-faq-tab.active {
        background: #3b82f6;
        color: #ffffff;
    }
    .sella-faq-scrollbox::-webkit-scrollbar-thumb {
        background-color: #475569;
    }
}
