/* ============================================================================
   AnsPress /questions layout scaffolding
   ============================================================================
   These utilities keep the base listing layout tidy while the card-specific
   styling lives inside `e123-question-card.css`.
   ============================================================================ */

/* Hide unused right column on the base listing */
body.ap-page-base #ap-lists aside,
body.ap-page-base .ap-question-right,
body.ap-page-base .widget-area {
    display: none !important;
}

/* Allow the list column to span the full width */
body.ap-page-base .ap-question-lr .ap-q-left,
body.ap-page-base .ap-question-lr .ap-col-8 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* Filter toolbar --------------------------------------------------------- */
body.ap-page-base .ap-list-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
    padding: 1rem 1.25rem !important;
    background: linear-gradient(135deg, #ede9fe 0%, #fdf2f8 100%) !important;
    border-radius: 1rem !important;
    box-shadow: 0 0.25rem 0.75rem rgba(79, 70, 229, 0.12) !important;
}

body.ap-page-base .ap-list-head .ap-search-form {
    order: 2;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

body.ap-page-base .ap-list-head .ap-search-form .ap-search-inner {
    flex: 1 !important;
    display: flex !important;
    order: 1;
}

body.ap-page-base .ap-list-head .ap-search-input {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0.65rem 0.9rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.65rem !important;
    font-size: 0.95rem !important;
}

body.ap-page-base .ap-list-head .ap-search-input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
    outline: none !important;
}

body.ap-page-base .ap-list-head .ap-filters {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
}

/* Hide default order/category/reset controls */
body.ap-page-base #ap-filters,
body.ap-page-base .ap-list-head .filter-order_by,
body.ap-page-base .ap-list-head .filter-category,
body.ap-page-base .ap-list-head #ap-filter-reset {
    display: none !important;
}

body.ap-page-base .ap-list-head .ap-dropdown-toggle,
body.ap-page-base .ap-list-head .ap-btn.ap-search-btn,
body.ap-page-base .ap-list-head .ap-btn-ask,
body.ap-page-base .ap-list-head #ap-filter-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 2.5rem !important;
    padding: 0.4rem 1.2rem !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
}

body.ap-page-base .ap-list-head .ap-btn.ap-search-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    order: 2;
    margin-left: 0.5rem;
}

body.ap-page-base .ap-list-head .ap-btn-ask {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: #ffffff !important;
    border: none !important;
    min-width: 9rem;
    white-space: nowrap;
}

body.ap-page-base .ap-list-head #ap-filter-reset {
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
    background: #ffffff !important;
}

/* Pagination ------------------------------------------------------------- */
body.ap-page-base .ap-pagination {
    margin-top: 2rem !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

body.ap-page-base .ap-pagination a,
body.ap-page-base .ap-pagination span {
    padding: 0.45rem 0.9rem !important;
    border-radius: 0.5rem !important;
    border: 2px solid #e5e7eb !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body.ap-page-base .ap-pagination .current {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
}

body.ap-page-base .ap-list-head .pull-right {
    order: 1;
    margin: 0;
}
