/* Page-specific styles for /faq. Base FAQ styles live in style-homepage-gwp.css. */

.gwp-faq.gwp-faq--redesign { overflow-x: hidden; }

.gwp-faq--redesign .gwp-faq__question,
.gwp-faq--redesign .gwp-faq__answer,
.gwp-faq--redesign .gwp-faq__answer p,
.gwp-faq--redesign .gwp-faq__answer li {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* The shared .gwp-faq__answer rules zero all p margins for single-paragraph use. */
.gwp-faq__answer p + p,
.gwp-faq__answer ul + p,
.gwp-faq__answer p + ul {
    margin-top: 12px !important;
}

.gwp-faq__answer ul {
    margin: 12px 0;
    padding-left: 22px;
    list-style: disc;
}

.gwp-faq__answer ul li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.gwp-faq__answer ul li:last-child {
    margin-bottom: 0;
}

.gwp-faq__subtitle {
    max-width: 640px;
    margin-top: 16px !important;
    font-family: var(--gwp-font-body);
    font-weight: 400;
    font-size: var(--gwp-fs-md);
    line-height: 26px;
    color: #6b7280;
}

@media (max-width: 575px) {
    .gwp-faq__subtitle { font-size: 14px; line-height: 22px; }
}

.gwp-faq__filter {
    max-width: 1010px;
    margin: 30px auto 0;
    padding: 0 12px;
    box-sizing: border-box;
}

.gwp-faq__filter-heading {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 20px !important;
    font-family: var(--gwp-font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: #6b7280;
}

.gwp-faq__filter-heading::before,
.gwp-faq__filter-heading::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e1e5f2;
}

.gwp-faq__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.gwp-faq__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 14px 18px;
    border-radius: 60px;
    background: #fff;
    border: 1px solid #d9def1;
    color: #31356e;
    font-family: var(--gwp-font-title);
    font-weight: 500;
    font-size: 16px;
    line-height: 23px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gwp-faq__tab:hover,
.gwp-faq__tab:focus-visible {
    border-color: #585fbe;
    background: #f5f7fe;
}

.gwp-faq__tab.is-active {
    background: #31356e;
    border-color: #31356e;
    color: #fff;
    font-weight: 700;
}

.gwp-faq__tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    color: #585fbe;
}

.gwp-faq__tab.is-active .gwp-faq__tab-icon {
    color: #fff;
}

.gwp-faq__select {
    display: none;
    position: relative;
}

.gwp-faq__select-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    background: #f7f8fd;
    border: 1px solid #e3e7f5;
    text-align: left;
    cursor: pointer;
}

.gwp-faq__select-glyph {
    margin-right: 14px;
    font-size: 20px;
    line-height: 1;
    color: #585fbe;
    flex-shrink: 0;
}

.gwp-faq__select-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.gwp-faq__select-label {
    font-family: var(--gwp-font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    color: #6b7280;
}

.gwp-faq__select-value {
    font-family: var(--gwp-font-title);
    font-weight: 700;
    font-size: 17px;
    line-height: 24px;
    color: #31356e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gwp-faq__select-caret {
    margin-left: 12px;
    font-size: 18px;
    line-height: 1;
    color: #585fbe;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.gwp-faq__select-toggle[aria-expanded="true"] .gwp-faq__select-caret {
    transform: rotate(180deg);
}

.gwp-faq__select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 1px solid #e3e7f5;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(49, 53, 110, 0.16);
    max-height: 60vh;
    overflow-y: auto;
}

.gwp-faq__select-menu[hidden] {
    display: none;
}

.gwp-faq__select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-family: var(--gwp-font-title);
    font-weight: 500;
    font-size: 16px;
    line-height: 23px;
    color: #31356e;
    text-align: left;
    cursor: pointer;
}

.gwp-faq__select-menu li + li .gwp-faq__select-option {
    box-shadow: inset 0 1px 0 #eef0f8;
}

/* No hairline directly under the highlighted row */
.gwp-faq__select-menu li:has(.is-selected) + li .gwp-faq__select-option {
    box-shadow: none;
}

.gwp-faq__select-option.is-selected {
    background: #eef1fc;
    font-weight: 700;
    box-shadow: none;
}

.gwp-faq__select-check {
    font-size: 18px;
    line-height: 1;
    color: #585fbe;
    flex-shrink: 0;
    opacity: 0;
}

.gwp-faq__select-option.is-selected .gwp-faq__select-check {
    opacity: 1;
}

.gwp-faq__helper {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    padding: 0 12px;
    font-family: var(--gwp-font-body);
    font-weight: 400;
    font-size: var(--gwp-fs-base);
    line-height: 22px;
    color: #6b7280;
    text-align: center;
}

.gwp-faq__helper + .gwp-faq__list {
    margin-top: 0 !important;
}

.gwp-faq__helper .bi-info-circle {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    font-size: 16px;
    color: #9aa3b2;
    line-height: 1;
}

.gwp-faq__helper-link {
    color: #585fbe;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gwp-faq__helper-link:hover,
.gwp-faq__helper-link:focus {
    color: #31356e;
}

@media (max-width: 991px) {
    .gwp-faq__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .gwp-faq__tab { min-height: 54px; padding: 12px 16px; font-size: 15px; }
    .gwp-faq__tab-icon { font-size: 16px; margin-right: 8px; }
}

@media (max-width: 767px) {
    .gwp-faq__filter { margin-top: 24px; }
    .gwp-faq__filter-heading { display: none; }
    .gwp-faq__tabs { display: none; }
    .gwp-faq__select { display: block; }
}
