/* =============================================================
   Advanced Search Plugin — Frontend CSS
   ============================================================= */

.asp-search-wrap {
    margin: 24px 0;
    font-family: inherit;
}

.asp-form {
    margin-bottom: 16px;
}

.asp-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.asp-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    min-width: 0;
}

.asp-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

.asp-btn {
    padding: 10px 18px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}

.asp-btn:hover {
    background: #135e96;
}

.asp-filters {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    border-radius: 4px;
    background: #fafafa;
    margin: 0;
}

.asp-filters legend {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 0 8px;
}

.asp-filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 10px 4px 0;
    cursor: pointer;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.15s;
}

.asp-filter-checkbox:hover {
    border-color: #2271b1;
}

.asp-filter-checkbox input:checked + span {
    color: #2271b1;
    font-weight: 600;
}

.asp-filter-checkbox:has(input:checked) {
    background: #e0e7ff;
    border-color: #2271b1;
}

.asp-count {
    font-size: 13px;
    color: #666;
    margin: 8px 0 12px;
    font-style: italic;
}

.asp-results {
    min-height: 60px;
    position: relative;
}

.asp-results.asp-loading {
    opacity: 0.5;
    pointer-events: none;
}

.asp-results.asp-loading::after {
    content: '⟳';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    animation: asp-spin 1s linear infinite;
}

@keyframes asp-spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

.asp-no-results {
    padding: 24px;
    text-align: center;
    color: #888;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Templates par défaut */
.asp-result,
.asp-json-result {
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-bottom: 12px;
    background: #fff;
    transition: box-shadow 0.15s;
}

.asp-result:hover,
.asp-json-result:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.asp-result h3,
.asp-json-result h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.asp-result a,
.asp-json-result a {
    color: #2271b1;
    text-decoration: none;
}

.asp-result a:hover,
.asp-json-result a:hover {
    text-decoration: underline;
}

.asp-result .asp-meta {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.asp-result p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Pagination */
.asp-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.asp-pages {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.asp-page {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.15s;
}

.asp-page:hover {
    background: #f0f0f0;
}

.asp-page.asp-current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    font-weight: 600;
}

.asp-dots {
    padding: 0 4px;
    color: #888;
}

.asp-error {
    background: #fde8e8;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 12px 16px;
    border-radius: 4px;
}

/* JSON list */
.asp-json-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
