/* FULM Ricerca Libri - Stili v2 (Chatbase) */

.fulm-ricerca-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Form di ricerca */
.fulm-ricerca-form {
    margin-bottom: 2rem;
}

.fulm-ricerca-input-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fulm-ricerca-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.fulm-ricerca-input:focus {
    border-color: #0073aa;
    outline: none;
}

.fulm-ricerca-btn {
    padding: 0.75rem 1.5rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.fulm-ricerca-btn:hover {
    background: #005a87;
}

/* Info risultati */
.fulm-ricerca-info {
    padding: 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

/* Singolo risultato */
.fulm-risultato-item {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.fulm-risultato-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Layout immagine + contenuto */
.fulm-risultato-inner {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.fulm-risultato-thumb {
    flex-shrink: 0;
    width: 120px;
}

.fulm-risultato-thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.fulm-risultato-content {
    flex: 1;
    min-width: 0;
}

.fulm-risultato-header {
    margin-bottom: 0.5rem;
}

.fulm-risultato-titolo {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.fulm-risultato-titolo a {
    color: #0073aa;
    text-decoration: none;
}

.fulm-risultato-titolo a:hover {
    text-decoration: underline;
}

.fulm-risultato-post-id {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #888;
}

.fulm-risultato-pagine {
    font-size: 0.9rem;
    color: #0073aa;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.fulm-risultato-pagine-label {
    color: #555;
    font-weight: 600;
}

.fulm-risultato-risposta {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
    padding: 0.75rem;
    background: #fafafa;
    border-left: 3px solid #0073aa;
    border-radius: 0 4px 4px 0;
    margin-bottom: 0.75rem;
}

.fulm-risultato-footer {
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.fulm-risultato-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.fulm-risultato-link:hover {
    text-decoration: underline;
}

/* Loading */
.fulm-ricerca-loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.fulm-ricerca-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: fulm-spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes fulm-spin {
    to { transform: rotate(360deg); }
}

/* Nessun risultato */
.fulm-ricerca-vuota {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .fulm-ricerca-input-wrapper {
        flex-direction: column;
    }
    .fulm-ricerca-input,
    .fulm-ricerca-btn {
        width: 100%;
    }
    .fulm-risultato-inner {
        flex-direction: column;
    }
    .fulm-risultato-thumb {
        width: 100%;
        max-width: 200px;
    }
}
