/* ==========================================================================
   Experience AJAX Search — Frontend Styles  v1.0.3
   Plugin: experience-ajax-search
   Author: Maurizio Albertoni | dpsonline — https://www.dpsonline.it

   NOTE: Card/grid styles are intentionally omitted — the results HTML uses
   the theme's sc_blogger / trx_addons classes so they inherit site styling.
   This file only covers the filter bar, spinner and pagination.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.eas-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Filtri — griglia 3 colonne fissa
   -------------------------------------------------------------------------- */
.eas-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 20px;
    padding: 24px 28px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 36px;
    align-items: end;
}

/* Ogni voce occupa una cella */
.eas-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Pulsanti: affiancati orizzontalmente, allineati in basso */
.eas-filter-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-self: end;
}

.eas-filter-item label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.eas-filter-item select,
.eas-filter-item input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.92rem;
    color: #222;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.eas-filter-item input[type="text"] {
    background-image: none;
    padding-right: 12px;
}

.eas-filter-item select:focus,
.eas-filter-item input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .15);
}

.eas-filter-item select option:disabled {
    color: #bbb;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Pulsanti
   -------------------------------------------------------------------------- */
.eas-btn {
    flex: 1;
    padding: 9px 20px;
    border: none;
    border-radius: 5px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
}

.eas-btn:active {
    transform: scale(.97);
}

.eas-btn-search {
    background: #0073aa;
    color: #fff;
}

.eas-btn-search:hover {
    background: #005f8a;
}

.eas-btn-search:disabled {
    background: #7ab3d0;
    cursor: not-allowed;
}

.eas-btn-reset {
    background: transparent;
    color: #555;
    border: 1px solid #bbb;
}

.eas-btn-reset:hover {
    background: #eee;
    color: #222;
}

/* --------------------------------------------------------------------------
   Loading state
   -------------------------------------------------------------------------- */
.eas-results {
    position: relative;
    min-height: 80px;
    transition: opacity .25s;
}

.eas-results.eas-loading {
    opacity: .35;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.eas-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.eas-spinner.visible {
    display: block;
}

.eas-spinner::after {
    content: '';
    display: block;
    width: 44px;
    height: 44px;
    border: 4px solid rgba(0,0,0,.12);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: eas-spin .7s linear infinite;
}

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

/* --------------------------------------------------------------------------
   No-results message
   -------------------------------------------------------------------------- */
.eas-no-results {
    text-align: center;
    padding: 52px 20px;
    color: #888;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Paginazione
   -------------------------------------------------------------------------- */
.eas-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 36px;
}

.eas-page-btn {
    padding: 7px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background .2s, border-color .2s;
    line-height: 1.4;
}

.eas-page-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.eas-page-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}

.eas-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.eas-page-ellipsis {
    padding: 7px 6px;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (≤ 900px): 2 colonne
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .eas-filters {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 12px 16px;
    }

    /* Pulsanti su riga intera */
    .eas-filter-actions {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (≤ 600px): 1 colonna
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .eas-filters {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 10px;
    }

    .eas-filter-actions {
        grid-column: 1;
    }
}

/* --------------------------------------------------------------------------
   Theme column override
   -------------------------------------------------------------------------- */
.trx_addons_column-1_3 {
    width: 33%;
}
