/* eサービス Q&A page (Figma SU_03). Layout chain: page-eservice / mail-magazine / page-contact. */

.sn-es-main > * {
    margin-bottom: 24px;
}
.sn-es-main > *:last-child {
    margin-bottom: 0;
}

.esqa-search {
    display: flex;
    align-items: stretch;
    gap: 18px;
    margin: 0 0 40px;
    width: 100%;
}

.esqa-search-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.esqa-search-input {
    width: 100%;
    height: 52px;
    padding: 12px 48px 12px 16px;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    color: #061C3D;
    background: #FFFFFF;
    box-sizing: border-box;
}

.esqa-search-input::placeholder {
    color: #9AA5B1;
}

.esqa-search-input:focus {
    outline: none;
    border-color: #008F8D;
}

.esqa-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6A778B;
    display: flex;
    align-items: center;
}

/* Reset border/cursor because this is a <button>, not the shared <a> button. */
.esqa-search-btn {
    width: 224px;
    min-width: 0;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.esqa-search-btn:active {
    transform: scale(0.98);
}

.esqa-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 26px;
    width: 100%;
}

.esqa-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 41px;
    padding: 8px 16px;
    border: 1px solid #00C48A;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 21px;
    color: #42526B;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.esqa-tab:hover {
    background: #ECFDF5;
    border-color: #008F8D;
    color: #008F8D;
}

.esqa-tab.is-active {
    background: #008F8D;
    border-color: #008F8D;
    color: #FFFFFF;
}

.esqa-tab.is-active:hover {
    background: #008F8D;
    color: #FFFFFF;
}

.esqa-cat-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.02em;
    color: #061C3D;
    margin: 0 0 26px;
}

@media (max-width: 991px) {
    .esqa-search {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 32px;
    }
    .esqa-search-btn {
        width: 100%;
        justify-content: center;
    }
    .esqa-tabs {
        gap: 10px;
        margin-bottom: 20px;
    }
    .esqa-tab {
        font-size: 14px;
        min-height: 36px;
        padding: 6px 12px;
    }
    .esqa-cat-title {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 20px;
    }
}

@media (max-width: 560px) {
    .esqa-search {
        margin-bottom: 24px;
    }
    .esqa-tabs {
        margin-bottom: 16px;
    }
}

@media (max-width: 420px) {
    .esqa-search {
        margin-bottom: 20px;
    }
    .esqa-tabs {
        margin-bottom: 14px;
    }
}

.rs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
    width: 100%;
}

.rs-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #CDD2D8;
    color: #42526B;
    text-decoration: none;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.rs-page-link:hover:not(.current):not(.disabled) {
    background-color: #ECFDF5;
    border-color: #008F8D;
    color: #008F8D;
}

.rs-page-link.current {
    background-color: #008F8D;
    border-color: #008F8D;
    color: #FFFFFF;
    font-weight: 700;
    cursor: default;
}

.rs-page-link.rs-page-prev,
.rs-page-link.rs-page-next {
    background-color: #FFFFFF;
    border: 1px solid #CDD2D8;
    color: #000000;
}

.rs-page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #F4F5F6;
    border-color: #E6E8EC;
    color: #B4BBC5;
}

.rs-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #061C3D;
}

/* Prevent global `svg { display:block; width:100% }` from stretching arrows. */
.rs-page-link svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
    flex-shrink: 0;
}
