/* =========================================================
   PASSCASH HELP CENTER
   SEARCH PAGE
   ========================================================= */

.help-search-results {
    width: 100%;
    padding: 52px 0 90px;
    background: #f8fafb;
}

.help-search-results > .help-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   SEARCH RESULTS HEADER
   ========================================================= */

.help-search-results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 24px;
}

.help-results-label {
    display: inline-flex;
    align-items: center;

    margin-bottom: 7px;

    color: var(--pc-green);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.help-search-results-header h2 {
    margin: 0;

    color: var(--pc-heading);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 750;
    line-height: 1.15;
}

.help-search-results-header h2 span {
    color: var(--pc-green);
}

.help-results-count {
    flex: 0 0 auto;

    padding: 9px 14px;

    border: 1px solid rgba(10, 187, 109, 0.16);
    border-radius: 999px;

    background: rgba(10, 187, 109, 0.06);
    color: var(--pc-green);

    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.help-search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;

    margin-bottom: 34px;
}

.help-search-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #637080;
    font-size: 13px;
    font-weight: 550;
}

.help-search-summary i {
    color: var(--pc-green);
    font-size: 14px;
}


/* =========================================================
   RESULT SECTIONS
   ========================================================= */

.help-search-section {
    width: 100%;
    margin-bottom: 34px;
    padding: 28px;

    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;

    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.03),
        0 8px 24px rgba(16, 24, 40, 0.04);
}

.help-search-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.help-search-section-title {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 0;
}

.help-search-section-title > div {
    min-width: 0;
}

.help-search-section-title > div > span {
    display: block;

    margin-bottom: 4px;

    color: #8a95a3;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.help-search-section-title h2 {
    margin: 0;

    color: var(--pc-heading);
    font-size: 21px;
    font-weight: 750;
    line-height: 1.25;
}

.help-search-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    border-radius: 12px;

    background: rgba(10, 187, 109, 0.08);
    color: var(--pc-green);

    font-size: 18px;
}

.help-search-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    height: 32px;
    padding: 0 10px;

    border-radius: 999px;

    background: #f2f5f7;
    color: #596574;

    font-size: 12px;
    font-weight: 750;
}


/* =========================================================
   CATEGORY GRID
   ========================================================= */

.help-search-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.help-search-category-card {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 15px;

    min-width: 0;
    min-height: 150px;
    padding: 20px;

    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 15px;

    background: #ffffff;
    color: inherit;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.help-search-category-card:hover {
    border-color: rgba(10, 187, 109, 0.22);

    box-shadow:
        0 8px 24px rgba(16, 24, 40, 0.06);

    transform: translateY(-2px);
}

.help-search-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    border-radius: 12px;

    background: rgba(10, 187, 109, 0.08);
    color: var(--pc-green);

    font-size: 18px;
}

.help-search-category-content {
    min-width: 0;
    padding-right: 20px;
}

.help-search-category-parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 6px;

    color: #8b96a3;

    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

.help-search-category-parent i {
    font-size: 11px;
}

.help-search-category-content h3 {
    margin: 0 0 7px;

    color: var(--pc-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.help-search-category-content p {
    margin: 0;

    color: #6f7b88;
    font-size: 13px;
    line-height: 1.65;
}

.help-search-category-arrow {
    position: absolute;
    right: 16px;
    top: 16px;

    color: #9ba4af;
    font-size: 13px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.help-search-category-card:hover .help-search-category-arrow {
    color: var(--pc-green);
    transform: translate(2px, -2px);
}


/* =========================================================
   ARTICLE RESULTS
   ========================================================= */

.help-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-result {
    width: 100%;
}

.help-result-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    width: 100%;
    min-width: 0;
    padding: 18px 20px;

    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;

    background: #ffffff;
    color: inherit;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.help-result-link:hover {
    border-color: rgba(10, 187, 109, 0.22);

    box-shadow:
        0 7px 20px rgba(16, 24, 40, 0.05);

    transform: translateY(-1px);
}

.help-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 11px;

    background: #f3f6f7;
    color: var(--pc-green);

    font-size: 17px;
}

.help-result-content {
    min-width: 0;
}

.help-result-category {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    margin-bottom: 6px;

    color: #8a95a3;

    font-size: 11px;
    font-weight: 650;
}

.help-result-category i {
    font-size: 9px;
}

.help-result-content h2 {
    margin: 0 0 6px;

    color: var(--pc-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.help-result-content p {
    margin: 0 0 9px;

    color: #6d7885;
    font-size: 13px;
    line-height: 1.65;
}

.help-result-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--pc-green);

    font-size: 12px;
    font-weight: 700;
}

.help-result-read i {
    transition: transform 0.2s ease;
}

.help-result-link:hover .help-result-read i {
    transform: translateX(3px);
}

.help-result-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 50%;

    color: #8994a0;
    font-size: 12px;
}

.help-result-link:hover .help-result-arrow {
    border-color: rgba(10, 187, 109, 0.18);
    color: var(--pc-green);
}


/* =========================================================
   FAQ RESULTS
   ========================================================= */

.help-search-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-search-faq {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;

    width: 100%;
    padding: 18px 20px;

    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;

    background: #ffffff;
}

.help-search-faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 11px;

    background: rgba(10, 187, 109, 0.08);
    color: var(--pc-green);

    font-size: 17px;
}

.help-search-faq-content {
    min-width: 0;
}

.help-search-faq-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;

    margin-bottom: 7px;

    color: #8a95a3;

    font-size: 11px;
    font-weight: 650;
}

.help-search-faq-meta > span:first-child {
    color: var(--pc-green);
    font-weight: 750;
}

.help-search-faq-meta i {
    font-size: 9px;
}

.help-search-faq-content h3 {
    margin: 0 0 7px;

    color: var(--pc-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.help-search-faq-content p {
    margin: 0 0 10px;

    color: #6d7885;
    font-size: 13px;
    line-height: 1.65;
}

.help-search-faq-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--pc-green);

    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.help-search-faq-link:hover {
    color: var(--pc-green-dark);
}

.help-search-faq-link i {
    transition: transform 0.2s ease;
}

.help-search-faq-link:hover i {
    transform: translateX(3px);
}


/* =========================================================
   EMPTY SEARCH STATE
   ========================================================= */

.help-search-empty {
    max-width: 720px;
    margin: 30px auto 0;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.help-search-section .help-pagination {
    margin-top: 24px;
}


/* =========================================================
   FOCUS STATES
   ========================================================= */

.help-search-category-card:focus-visible,
.help-result-link:focus-visible,
.help-search-faq-link:focus-visible {
    outline: 3px solid rgba(10, 187, 109, 0.2);
    outline-offset: 3px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .help-search-results > .help-container {
        width: min(920px, calc(100% - 32px));
    }

    .help-search-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .help-search-results {
        padding: 38px 0 65px;
    }

    .help-search-results > .help-container {
        width: min(100% - 28px, 680px);
    }

    .help-search-results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .help-results-count {
        align-self: flex-start;
    }

    .help-search-section {
        padding: 20px;
        border-radius: 15px;
    }

    .help-search-section-heading {
        align-items: flex-start;
    }

    .help-search-category-grid {
        grid-template-columns: 1fr;
    }

    .help-result-link {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .help-result-arrow {
        display: none;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .help-search-results > .help-container {
        width: calc(100% - 20px);
    }

    .help-search-results-header h2 {
        font-size: 28px;
    }

    .help-search-summary {
        gap: 8px 14px;
    }

    .help-search-section {
        padding: 16px;
    }

    .help-search-section-title {
        gap: 10px;
    }

    .help-search-section-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .help-search-section-title h2 {
        font-size: 18px;
    }

    .help-search-category-card {
        min-height: 0;
        padding: 16px;
    }

    .help-result-link {
        gap: 12px;
        padding: 15px;
    }

    .help-result-icon,
    .help-search-faq-icon {
        width: 38px;
        height: 38px;
    }

    .help-search-faq {
        gap: 12px;
        padding: 15px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .help-search-category-card,
    .help-result-link,
    .help-result-arrow,
    .help-search-category-arrow,
    .help-result-read i,
    .help-search-faq-link i {
        transition: none;
    }

    .help-search-category-card:hover,
    .help-result-link:hover {
        transform: none;
    }
}

/* =========================================================
   SEARCH PAGE FINAL LAYOUT FIXES
   ========================================================= */

/*
 * Make the category grid use the available width.
 * One result = full-width card.
 * Multiple results = responsive columns.
 */
.help-search-category-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(280px, 1fr)
    );
    gap: 16px;
    width: 100%;
}


/*
 * Prevent the search icon from overlapping the input text.
 * The !important protects this from Bootstrap or component-level
 * input padding overrides.
 */
.help-search-field input {
    padding-left: 56px !important;
}


/*
 * Keep the icon vertically centered.
 */
.help-search-icon {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}


/*
 * Preserve the icon position when the search field is focused.
 */
.help-search-field:focus-within .help-search-icon {
    transform: translateY(-50%) scale(1.04);
}


/*
 * Ensure the category card uses the full grid cell.
 */
.help-search-category-card {
    width: 100%;
    min-width: 0;
}


/*
 * At tablet sizes, allow cards to expand naturally.
 */
@media (max-width: 992px) {

    .help-search-category-grid {
        grid-template-columns: repeat(
            auto-fit,
            minmax(250px, 1fr)
        );
    }
}


/*
 * Mobile: one card per row.
 */
@media (max-width: 576px) {

    .help-search-category-grid {
        grid-template-columns: 1fr;
    }

    .help-search-field input {
        padding-left: 45px !important;
    }

    .help-search-icon {
        left: 18px;
    }
}


/*
 * Small mobile.
 */
@media (max-width: 400px) {

    .help-search-field input {
        padding-left: 41px !important;
    }

    .help-search-icon {
        left: 16px;
    }
}