.fexerj-pesquisa-shortcode {
    display: inline-block;
}

.fexerj-pesquisa-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.fexerj-pesquisa-trigger:hover,
.fexerj-pesquisa-trigger:focus {
    color: #0073aa;
}

.fexerj-pesquisa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fexerj-pesquisa-modal[hidden] {
    display: none;
}

.fexerj-pesquisa-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.fexerj-pesquisa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.fexerj-pesquisa-container {
    position: relative;
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fexerj-pesquisa-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 16px;
    gap: 12px;
}

.fexerj-pesquisa-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    padding: 8px 0;
    color: #333;
}

.fexerj-pesquisa-input::placeholder {
    color: #999;
}

.fexerj-pesquisa-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.fexerj-pesquisa-close:hover,
.fexerj-pesquisa-close:focus {
    color: #333;
}

.fexerj-pesquisa-results {
    overflow-y: auto;
    padding: 16px;
    flex: 1;
}

.fexerj-pesquisa-loading,
.fexerj-pesquisa-empty,
.fexerj-pesquisa-error {
    padding: 24px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.fexerj-pesquisa-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fexerj-pesquisa-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.fexerj-pesquisa-item:hover,
.fexerj-pesquisa-item:focus {
    background: #f5f5f5;
}

.fexerj-pesquisa-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fexerj-pesquisa-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fexerj-pesquisa-thumb .fexerj-pesquisa-no-image {
    width: 24px;
    height: 24px;
    color: #bbb;
}

.fexerj-pesquisa-content {
    flex: 1;
    min-width: 0;
}

.fexerj-pesquisa-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.fexerj-pesquisa-excerpt {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 480px) {
    .fexerj-pesquisa-modal {
        padding-top: 40px;
    }

    .fexerj-pesquisa-container {
        width: 95%;
        max-height: 90vh;
    }

    .fexerj-pesquisa-thumb {
        width: 64px;
        height: 64px;
    }

    .fexerj-pesquisa-title {
        font-size: 15px;
    }

    .fexerj-pesquisa-excerpt {
        font-size: 13px;
    }
}
