.mrgf-widget[data-autoload="false"] .mrgf-sort-container {
  display: none;
}

.mrgf-widget {
    margin: 0;
}

.mrgf-widget .mrgf-results-container {
    max-width: 1120px;
    margin: 0 auto;
    margin-bottom: 1rem;
    font-family: 'Roboto';
}

.mrgf-widget .result-counter {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.mrgf-widget .mrgf-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mrgf-widget #loadMore {
    margin: 1.5rem auto;
    display: none;
    background-color: #D80080;
    color: #fff;
    border: 1px solid #D80080;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.mrgf-card-row1,
.mrgf-card-row2 {
    display: none;
}

.mrgf-card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: rgba(0, 0, 0, .1) 0 1px 3px 0, rgba(0, 0, 0, .06) 0 1px 2px 0;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows:
        auto auto auto auto auto;
    grid-template-areas:
        "logo       scheme"
        "rate       pmt"
        "apr        total-fees"
        "placeholder annual-cost"
        "apply-btn  apply-btn";
    gap: 0;
    padding: 1rem
}

.mrgf-card .logo {
    grid-area: logo;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #EEE;
    padding-bottom: 1rem;
}

.mrgf-card .logo img {
    width: auto;
    height: 64px;
    object-fit: contain;
}

.mrgf-widget .mrgf-card .scheme-wrapper {
    grid-area: scheme;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1rem;
    padding-top: .5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #EEE;
}

.mrgf-widget .mrgf-card .ltv {
    font-size: 0.85rem;
    font-weight: 500;
}

.mrgf-widget .mrgf-card .scheme {
    font-size: 0.85rem;
    font-weight: 500;
}

.mrgf-card .rate {
    grid-area: rate;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #EEE;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .rate .label,
.mrgf-card .pmt .label,
.mrgf-card .total-fees .label,
.mrgf-card .annual-cost .label,
.mrgf-card .apr .label {
    font-size: 0.85rem;
    color: #4E4E50;
    line-height: 1rem;
}

.mrgf-card .placeholder .label {
    font-size: 0.85rem;
    line-height: 2rem;
    color: #4E4E50;
}

.mrgf-card .rate .value,
.mrgf-card .pmt .value,
.mrgf-card .total-fees .value,
.mrgf-card .annual-cost .value,
.mrgf-card .apr .value,
.mrgf-card .placeholder .value {
    font-size: 1.3rem;
    font-weight: 500;
    color: #000;
    line-height: 2.5rem;
}

.mrgf-card .rate .followon {
    font-size: 0.78rem;
    color: #4E4E50;
    line-height: 1rem;
}

.mrgf-card .pmt {
    grid-area: pmt;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .apr {
    grid-area: apr;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #EEE;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .total-fees {
    grid-area: total-fees;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .placeholder {
    grid-area: placeholder;
    display: flex;
    line-height: 2.5rem;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .annual-cost {
    grid-area: annual-cost;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #EEE;
}

.mrgf-card .apply-btn {
    grid-area: apply-btn;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.mrgf-card .apply-btn a {
    background-color: #D80080;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1rem;
    width: 100%;
    text-align: center;
}

.mrgf-card .rate,
.mrgf-card .pmt,
.mrgf-card .apr,
.mrgf-card .total-fees,
.mrgf-card .annual-cost {
    display: flex;
    flex-direction: column;
    align-items: left;
    text-align: left;
    padding: 1rem .5rem 1rem 1rem;
}

.mrgf-card .annual-cost {
    padding: 1.5rem 1rem;
}

.mrgf-start-message {
    display: none;
}

@media (min-width: 1136px) {

    .mrgf-card>.logo,
    .mrgf-card>.scheme,
    .mrgf-card>.rate,
    .mrgf-card>.pmt,
    .mrgf-card>.apr,
    .mrgf-card>.total-fees,
    .mrgf-card>.placeholder,
    .mrgf-card>.annual-cost,
    .mrgf-card>.apply-btn {
        display: none;
    }

    .mrgf-card {
        display: flex;
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }

    .mrgf-card-row1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 1rem;
    }

    .mrgf-card-row1 .row1-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .mrgf-card-row1 .logo {
        flex: 0 0 144px;
        padding-bottom: 0;
        border: none;
    }

    .mrgf-card-row1 .logo img {
        width: auto;
        height: 80px;
    }

    .mrgf-widget .mrgf-card .scheme-wrapper {
        grid-area: scheme;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding-left: 1rem;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .mrgf-widget .mrgf-card .ltv {
        font-size: 0.85rem;
        color: #4E4E50;
    }

    .mrgf-widget .mrgf-card .scheme-wrapper {
        flex-direction: row;
    }

    .mrgf-widget .mrgf-card .scheme {
        font-size: 0.85rem;
        font-weight: 500;
    }

    .mrgf-card-row1 .row1-right {
        flex: 0 0 192px;
        display: flex;
        justify-content: flex-end;
    }

    .mrgf-card-row1 .apply-btn a {
        width: 192px;
    }

    .mrgf-card-row2 {
        display: flex;
        gap: 0;
        padding-top: 1rem;
    }

    .mrgf-card-row2>div {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 0;
    }

    .mrgf-card .apr .value,
    .mrgf-card .pmt .value,
    .mrgf-card .annual-cost .value,
    .mrgf-card .total-fees .value,
    .mrgf-card .rate .value {
        font-size: 1.5em;
    }

    .mrgf-card .annual-cost {
        padding: 1rem .5rem;
    }

    .mrgf-card .rate,
    .mrgf-card .pmt,
    .mrgf-card .annual-cost,
    .mrgf-card .total-fees {
        border-right: 1px solid #EEE;
        border-bottom: none;
        padding: 1rem .5rem;
    }

    .mrgf-card .apr {
        border-right: none;
        border-bottom: none;
    }

    .mrgf-card-row2 .label {
        font-size: 0.85rem;
        color: #4E4E50;
    }

    .mrgf-card-row2 .value {
        font-size: 1.5rem;
        font-weight: 500;
        color: #000;
    }

    .mrgf-card .apply-btn {
        margin-top: 0;
    }

    .mrgf-start-message {
        display: block;
        padding-top: 9rem;
        text-align: center;
        font-weight: 600;
        font-size: 1.5rem;
        color: #4f145b;
        font-family: Montserrat, "Open Sans", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    }
}



.mrgf-results-container {
    position: relative;
}

.mrgf-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -10;
}

.mrgf-spinner {
    position: fixed;
    top: 60%;
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #D80080;
    border-radius: 50%;
    animation: mrgf-spin 1s linear infinite;
}

@keyframes mrgf-spin {
    to {
        transform: rotate(360deg);
    }
}

.mrgf-widget .more-info-panel {
    display: none;
    flex-direction: column;
    font-size: .9rem;
}

@media (min-width: 1136px) {


    .mrgf-widget .more-info-panel {
        flex-direction: row;
        flex-wrap: wrap;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mrgf-widget .more-info-toggle {
        text-align: right;
        padding-right: 1rem;
        margin-top: 0 !important;
    }
}

.mrgf-widget .more-info-col {
    flex: 1;
}

.mrgf-widget .info-row {
    display: flex;
    min-height: 2rem;
    flex-wrap: wrap;
}

.mrgf-widget .info-wide {
    flex: 2;
}

.mrgf-widget .info-narrow {
    flex: 1;
    text-align: right;
}

.mrgf-widget .info-header {
    font-weight: 500;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mrgf-widget .more-info-toggle,
.mrgf-widget .more-info-panel {
    grid-column: 1 / -1;
}

.mrgf-widget .more-info-toggle {
    text-align: right;
}

.mrgf-widget .more-info-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: .35rem;
    cursor: pointer;
    color: #D80080;
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    line-height: 1rem;
    margin-top: 1rem;
}

.mrgf-widget .more-info-toggle::after {
    content: "";
    width: .5em;
    height: .5em;
    margin-right: .5rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .25s ease;
}

.mrgf-widget .more-info-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
}

.mrgf-widget .early-repayment-header {
    margin-bottom: .5rem;
}

.mrgf-widget .early-repayment-text {
    margin-bottom: 1rem;
}

.mrgf-widget .early-repayment-header,
.mrgf-widget .early-repayment-text {
    flex: 0 0 100%;
    width: 100%;
}

.mrgf-widget .representative-example-header {
    flex: 1;
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mrgf-widget .representative-example-text {
    flex: 1;
}

.mrgf-widget .more-info-col-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .mrgf-widget .more-info-col-container {
        flex-direction: row;
        width: 100%;
        gap: 2rem;
    }

    .mrgf-widget .representative-example-header {
        flex: 0 0 100%;
        order: 2;
    }

    .mrgf-widget .representative-example-text {
        flex: 0 0 100%;
        order: 2;
    }
}



.mrgf-widget #loadMore_mrgf_1 {
    display: block;
    background: #D80080;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s ease, opacity .25s ease;
}

.mrgf-widget #loadMore_mrgf_1:hover,
.mrgf-widget #loadMore_mrgf_1:focus {
    background: #b6006c;
    outline: none;
}

.mrgf-widget #loadMore_mrgf_1:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.tip-circle {
    --tip-bg: #4F145B;
    --tip-color: #fff;
    --tip-radius: 4px;
    --tip-offset: .5rem;
    --tip-width: 240px;

    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #D80080;
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    outline: none;
    overflow: visible;
    z-index: 9990;
    vertical-align: middle;
}

.tip-circle::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + var(--tip-offset));
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 160px;
    max-width: 320px;
    padding: .5rem .65rem;
    background: var(--tip-bg);
    color: var(--tip-color);
    border-radius: var(--tip-radius);
    font-size: .8rem;
    line-height: 1.25rem;
    white-space: normal;
    text-align: left;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 9999;
}

.tip-circle::before {
    content: "";
    position: absolute;
    bottom: calc(100% + var(--tip-offset) - 2px);
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--tip-bg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
    transition: opacity .2s ease;
    opacity: 0;
    visibility: hidden;
}

.tip-circle:hover::after,
.tip-circle:focus::after,
.tip-circle:hover::before,
.tip-circle:focus::before {
    opacity: 1;
    visibility: visible;
}

.tip-circle:focus-visible {
    box-shadow: 0 0 0 2px #005fcc inset, 0 0 0 2px #005fcc;
}

.tip-circle::after {
    width: max-content;
    min-width: 160px;
    max-width: min(210px, 90vw);
}

.tip-circle:not(.tip-left):not(.tip-right)::after {
    left: 50%;
    transform: translateX(-50%);
}

.tip-circle:not(.tip-left):not(.tip-right)::before {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.tip-circle.tip-left::after {
    left: 0;
    transform: none;
}

.tip-circle.tip-left::before {
    left: 12px;
    transform: rotate(45deg);
}

.tip-circle.tip-right::after {
    right: 0;
    left: auto;
    transform: none;
}

.tip-circle.tip-right::before {
    right: 12px;
    left: auto;
    transform: rotate(45deg);
}

.mrgf-widget .label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .35em;

}

.mrgf-widget select[id^="mrgfSort_"] {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 2px solid #D80080;
    border-radius: 4px;
    font-size: .95rem;
    line-height: 1.2rem;
    font-weight: 500;
    color: #333;
    padding: .5rem 2.4rem .5rem .8rem;
    cursor: pointer;
    transition: border-color .2s;
    max-width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23D80080' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: .55rem .55rem;
}

.mrgf-widget select[id^="mrgfSort_"]:hover,
.mrgf-widget select[id^="mrgfSort_"]:focus {
    border-color: #b6006c;
    outline: none;
}

.mrgf-widget select[id^="mrgfSort_"] option {
    font-size: .95rem;
}


@media (min-width: 1136px) {
    .mrgf-widget .mrgf-card>.scheme-wrapper {
        display: none;
    }
}

@media (max-width: 1135px) {
    .mrgf-widget .mrgf-card-row1 .scheme-wrapper {
        display: none;
    }
}

.mrgf-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding-bottom: 1rem;
}


.mrgf-sort-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;

}

.mrgf-description {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4f145b;
    display: flex;
    align-items: center;
    display: none;
}

@media (min-width: 1136px) {
    .mrgf-header {
        flex-direction: row;
        align-items: center;
        height: 64px;
        padding-bottom: 0;
    }

    .mrgf-widget .mrgf-description {
        flex: 2;
        justify-content: flex-start;
    }

    .mrgf-sort-container {
        flex: 1;
    }
}

.best-mortgage-rates-col-left {
    width: 100%;
}

@media (min-width: 768px) {
    .best-mortgage-rates-col-left {
        min-width: 336px;
    }
}


/* 1. Re-use this class on any button you want to look like a link */
.more-details-link-style {
    background: none;
    /* no grey button face */
    border: none;
    /* no bevelled edges */
    padding: 0;
    /* remove extra spacing */
    margin: 0;
    font: inherit;
    /* inherit size, weight and family */
    color: #0b66d6;
    /* typical link blue (adjust to match your palette) */
    text-decoration: underline;
    cursor: pointer;
    /* pointer cursor like <a> */
}

/* 2. States */
.more-details-link-style:hover,
.more-details-link-style:focus {
    text-decoration: none;
    /* many sites drop underline on hover/focus */
}

.more-details-link-style:focus-visible {
    /* keyboard focus outline for accessibility */
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* 3. Optional: disable default button styling on iOS/macOS Safari */
button.more-details-link-style {
    -webkit-appearance: none;
}