/* Calculator heading and category filters */
.tg-calculator-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.tg-category-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tg-category-filter {
    border: 1px solid #e2e5ee;
    border-radius: 24px;
    background: #fff;
    color: #17204d;
    padding: 10px 16px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tg-category-filter:hover,
.tg-category-filter.active {
    border-color: #f61793;
    background: #fff;
    color: #17204d;
}

/* Tooltip icon */
.tg-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #f61793;
    border-radius: 50%;
    background: #fff;
    color: #f61793;
    font-size: 12px;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    margin-left: 6px;
}

.tg-tooltip:hover::after,
.tg-tooltip:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 1000;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #17204d;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

/* Hide vendors that do not match the selected category */
.tg-vendor.hidden {
    display: none !important;
}

/* Keep the heading and category filters on the same row */
.tg-calculator-heading-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: initial;
    gap: 20px;
    width: 100%;
    margin-bottom: 28px;
}

.tg-calculator-heading-copy {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.tg-calculator-heading-copy h2 {
    margin-top: 0;
}

.tg-category-filters {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    position: static !important;
    transform: none !important;
    align-self: center;
}

.tg-category-filter {
    flex: 0 0 auto;
    white-space: nowrap;
}

.calculator-section .tg-funding-calculator .tg-result-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}


/* Payment options — match Contract term buttons */
.tg-payment-options {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tg-payment-options label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #e2e5ed;
    border-radius: 8px;
    background: #fff;
    color: #17204d;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-sizing: border-box;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

.tg-payment-options label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.tg-payment-options label.active,
.tg-payment-options label:has(input[type="radio"]:checked) {
    background: #f8f5ff;
    border: 2px solid #8b5cff;
    color: #7357ff;
    padding: 7px 13px;
}

.tg-payment-options label:hover {
    border-color: #8b5cff;
}

.tg-payment-options label:focus-within {
    outline: none;
}

.calculator-section .tg-funding-calculator .tg-input-wrapper{
  gap: 0px!important;
}

/* Result action buttons — consistent styling */
.tg-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

.tg-result-actions .tg-view-suppliers-button,
.tg-result-actions .tg-contact-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 210px !important;
    min-width: 210px;
    min-height: 52px;
    flex: 0 0 210px;

    margin: 0 !important;
    padding: 12px 16px !important;
    box-sizing: border-box;

    border: 1px solid #171D4B !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #171D4B !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;

    cursor: pointer;
    box-shadow: none !important;
    text-transform: none !important;
}

body .calculator-section .tg-funding-calculator .tg-contact-button{
	font-size: 14px !important;
    font-weight: 500 !important;
}

/* Same hover state */
.tg-result-actions .tg-view-suppliers-button:hover,
.tg-result-actions .tg-contact-button:hover {
    background: #f5f3fa !important;
    color: #171D4B !important;
}

/* Standardise both arrows */
.tg-result-actions .tg-view-suppliers-button::after {
    content: "→";
    display: inline-block;
    font: inherit;
    font-weight: 500;
}

.tg-result-actions .tg-view-suppliers-button:hover {
    background: #191E4B !important;
    color: #FFFFFF !important;
}


.tg-result-actions .tg-contact-button span {
    display: inline-block;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

body .calculator-section .tg-funding-calculator .tg-contact-button:hover span{
transform: translateX(0px)!important;
}

/* Mobile */
@media (max-width: 600px) {
    .tg-result-actions {
        flex-direction: column;
        align-items: center;
    }

    .tg-result-actions .tg-view-suppliers-button,
    .tg-result-actions .tg-contact-button {
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
        flex: 0 1 auto;
        white-space: normal;
    }
}


/* Responsive layout */
@media (max-width: 767px) {
    .tg-calculator-heading-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .tg-calculator-heading-copy,
    .tg-category-filters {
        grid-column: 1;
        grid-row: auto;
    }

    .tg-category-filters {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    .tg-calculator-heading-row {
        align-items: flex-start;
    }

    .tg-category-filters {
        width: 100%;
    }

    .tg-category-filter {
        padding: 8px 12px;
    }
}



/* Total grant summary above the comparison chart */
.tg-total-grant-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 20px 0;
    text-align: center;
}

.tg-total-grant-summary span {
    color: #17204d;
    font-size: 14px;
}

.tg-total-grant-summary strong {
    color: #171D4B;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
}

/* Full-width horizontal supplier chart */
.tg-horizontal-chart-wrapper {
    position: relative;
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 320px;
    min-height: 320px;
    margin: 0 0 24px;
    box-sizing: border-box;
}

.tg-horizontal-chart-wrapper canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
}

/* Total grant summary */
.tg-total-grant-summary {
    width: 100%;
    margin: 20px 0 28px;
    text-align: center;
}

.tg-total-grant-summary strong {
    font-size: 36px;
}

/* Override the theme's fixed 240px chart dimensions */
.calculator-section .tg-funding-calculator .tg-chart-wrapper.tg-horizontal-chart-wrapper {
    position: relative !important;
    display: block !important;

    width: 100% !important;
    max-width: none !important;

    height: 320px !important;
    min-height: 320px !important;

    margin: 0 0 24px !important;
    padding: 0 !important;

    box-sizing: border-box !important;
}

/* Make the canvas fill the available chart area */
.calculator-section .tg-funding-calculator .tg-chart-wrapper.tg-horizontal-chart-wrapper canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

.calculator-section .tg-funding-calculator .tg-funding-breakdown .tg-funding-disclaimer {
    margin: 16px 0 8px;
    color: #666b7a;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
	margin-top: 10px !important;
}

@media (max-width: 767px) {
    .calculator-section .tg-funding-calculator .tg-chart-wrapper.tg-horizontal-chart-wrapper {
        height: 300px !important;
        min-height: 300px !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .tg-horizontal-chart-wrapper {
        height: 300px;
        min-height: 300px;
    }

    .tg-total-grant-summary strong {
        font-size: 28px;
    }
}


/* Pre-loaded budget figures should look like suggestions, not user-entered values. */
.tg-funding-calculator .tg-input-wrapper input.tg-suggested-value {
    color: #9a9a9a;
}

.tg-funding-calculator .tg-input-wrapper input.tg-suggested-value:focus,
.tg-funding-calculator .tg-input-wrapper input:not(.tg-suggested-value) {
    color: #17204d;
}


/* =========================================================
   CLIENT DESIGN UPDATE: HORIZONTAL FUNDING RESULTS
   ========================================================= */

.tg-funding-calculator .tg-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.tg-funding-calculator .tg-card-heading h3 {
    margin: 0;
}

.tg-funding-calculator .tg-reset-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8b5cff;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.tg-funding-calculator .tg-reset-link:hover {
    color: #7357ff;
    background: transparent;
}

.tg-funding-calculator .tg-highest-funding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin: 12px 0 28px;
}

.tg-funding-calculator .tg-highest-funding-label {
    color: #777b9b;
    font-size: 16px;
}

.tg-funding-calculator .tg-highest-funding strong {
    color: #171d4b;
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 700;
    line-height: 1.1;
}

.tg-funding-calculator .tg-highest-funding-description {
    color: #a1a2bd;
    font-size: 14px;
}

.tg-funding-calculator .tg-result-card {
    display: flex;
    flex-direction: column;
}

.tg-funding-calculator .tg-funding-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tg-funding-calculator .tg-funding-row {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.tg-funding-calculator .tg-funding-name {
    color: #171d4b;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.tg-funding-calculator .tg-funding-progress {
    width: 100%;
    height: 24px;
    overflow: hidden;
    border-radius: 20px;
    background: #eef0f2;
}

.tg-funding-calculator .tg-funding-progress-bar {
    height: 100%;
    min-width: 0;
    border-radius: 20px;
    transition: width 0.4s ease;
}

.tg-funding-calculator .tg-funding-value {
    color: #171d4b;
    font-size: 16px;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.tg-funding-calculator .tg-funding-disclaimer {
    margin: 12px 0 0;
    color: #a1a2bd;
    font-size: 12px;
    line-height: 1.5;
}

.tg-funding-calculator .tg-result-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 28px;
}

.tg-funding-calculator #tg-contact:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(290px, 100%);
    min-height: 54px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #ed8d18;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
}

.tg-funding-calculator #tg-contact:not([hidden]):hover {
    background: #d8790e;
    color: #fff;
}

.tg-funding-calculator [hidden] {
    display: none !important;
}

@media (max-width: 767px) {
    .tg-funding-calculator .tg-highest-funding strong {
        font-size: 42px;
    }

    .tg-funding-calculator .tg-funding-row {
        grid-template-columns: 85px minmax(0, 1fr) 75px;
        gap: 8px;
    }

    .tg-funding-calculator .tg-funding-name,
    .tg-funding-calculator .tg-funding-value {
        font-size: 13px;
    }

    .tg-funding-calculator .tg-funding-progress {
        height: 18px;
    }

    .tg-funding-calculator #tg-contact:not([hidden]) {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tg-funding-calculator .tg-card-heading {
        align-items: flex-start;
    }

    .tg-funding-calculator .tg-card-heading h3 {
        font-size: 20px;
    }

    .tg-funding-calculator .tg-reset-link {
        font-size: 12px;
    }

    .tg-funding-calculator .tg-funding-row {
        grid-template-columns: 75px minmax(0, 1fr) 70px;
        gap: 6px;
    }

    .tg-funding-calculator .tg-funding-name,
    .tg-funding-calculator .tg-funding-value {
        font-size: 12px;
    }
}

/* =========================================================
   LIVE WEBSITE DESIGN MATCH — FINAL OVERRIDES
   Append after all existing calculator styles.
   ========================================================= */

/* Overall heading and category navigation */
.calculator-section .tg-funding-calculator {
    width: 100%;
    max-width: none;
    color: #171d4b;
}

.calculator-section .tg-funding-calculator .tg-calculator-heading-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100%;
    margin: 0 0 28px !important;
}

.calculator-section .tg-funding-calculator .tg-calculator-heading-copy h2 {
    margin: 0 0 2px !important;
    color: #171d4b;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.15;
}

.calculator-section .tg-funding-calculator .tg-calculator-heading-copy p {
    margin: 0 !important;
    color: #777b94;
    font-size: 18px;
    line-height: 1.4;
}

.calculator-section .tg-funding-calculator .tg-category-filters {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.calculator-section .tg-funding-calculator .tg-category-filter {
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #f61793 !important;
    border-radius: 6px !important;
    background: #f61793 !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.calculator-section .tg-funding-calculator .tg-category-filter.active,
.calculator-section .tg-funding-calculator .tg-category-filter:hover {
    border-color: #f61793 !important;
    background: #fff !important;
    color: #171d4b !important;
}

/* Two equal cards and spacing from the live layout */
.calculator-section .tg-funding-calculator .tg-calculator-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: stretch;
    gap: 46px !important;
    width: 100%;
}

.calculator-section .tg-funding-calculator .tg-card {
    min-width: 0;
    min-height: 636px;
    padding: 44px 46px !important;
    border: 1px solid #e5e5e8 !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.calculator-section .tg-funding-calculator .tg-card h3 {
    margin: 0 0 28px !important;
    color: #171d4b;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.calculator-section .tg-funding-calculator .tg-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    margin: 0 0 28px !important;
}

.calculator-section .tg-funding-calculator .tg-card-heading h3 {
    margin: 0 !important;
}

.calculator-section .tg-funding-calculator .tg-reset-link {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: #8b5cff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

/* Budget fields */
.calculator-section .tg-funding-calculator .tg-budget-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.calculator-section .tg-funding-calculator .tg-field label {
    display: block;
    margin: 0 0 8px;
    color: #171d4b;
    font-size: 14px;
    font-weight: 600;
}

.calculator-section .tg-funding-calculator .tg-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0 !important;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #e0e3e9;
    border-radius: 8px;
    background: #f8f9fb;
    box-sizing: border-box;
}

.calculator-section .tg-funding-calculator .tg-input-wrapper span {
    flex: 0 0 auto;
    color: #343b59;
    font-size: 16px;
}

.calculator-section .tg-funding-calculator .tg-input-wrapper input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 0 0 2px !important;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    color: #17204d;
    font-family: inherit;
    font-size: 16px;
    box-shadow: none !important;
}

.calculator-section .tg-funding-calculator .tg-input-wrapper input.tg-suggested-value {
    color: #9a9a9a;
}

/* Contract and payment controls */
.calculator-section .tg-funding-calculator .tg-option-section {
    margin: 0 0 28px;
}

.calculator-section .tg-funding-calculator .tg-option-section h4 {
    margin: 0 0 12px;
    color: #171d4b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.calculator-section .tg-funding-calculator .tg-option-buttons,
.calculator-section .tg-funding-calculator .tg-payment-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.calculator-section .tg-funding-calculator .tg-option-buttons button,
.calculator-section .tg-funding-calculator .tg-payment-options label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin: 0;
    padding: 8px 13px;
    border: 1px solid #e0e3e9;
    border-radius: 8px;
    background: #fff;
    color: #171d4b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    box-sizing: border-box;
}

.calculator-section .tg-funding-calculator .tg-option-buttons button.active,
.calculator-section .tg-funding-calculator .tg-payment-options label.active,
.calculator-section .tg-funding-calculator .tg-payment-options label:has(input:checked) {
    padding: 7px 12px;
    border: 2px solid #8b5cff;
    background: #faf8ff;
    color: #7357ff;
}

.calculator-section .tg-funding-calculator .tg-payment-options label input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

/* Provider logo buttons */
.calculator-section .tg-funding-calculator .tg-popular-vendors {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.calculator-section .tg-funding-calculator .tg-vendor {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 62px;
    padding: 8px 10px;
    border: 1px solid #8b5cff !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.calculator-section .tg-funding-calculator .tg-vendor img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

/* Left-card note */
.calculator-section .tg-funding-calculator .tg-calculator-note {
    margin: 58px 0 0 !important;
    color: #a1a7b7;
    font-size: 12px;
    line-height: 1.5;
}

/* Right card: centered highest figure and supplier bars */
.calculator-section .tg-funding-calculator .tg-result-card {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
}

.calculator-section .tg-funding-calculator .tg-result-card > h3 {
    margin-bottom: 0px !important;
}

.calculator-section .tg-funding-calculator .tg-highest-funding {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    gap: 5px;
    width: 100%;
    margin: 0 0 48px !important;
    text-align: center;
}

.calculator-section .tg-funding-calculator .tg-highest-funding-label {
    color: #8589a8;
    font-size: 16px;
    line-height: 1.4;
}

.calculator-section .tg-funding-calculator .tg-highest-funding strong {
    color: #171d4b;
    font-size: 58px;
    font-weight: 700;
    line-height: 1.1;
}

.calculator-section .tg-funding-calculator .tg-highest-funding-description {
    color: #a1a2bd;
    font-size: 14px;
    line-height: 1.4;
}

.calculator-section .tg-funding-calculator .tg-funding-breakdown {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
}

.calculator-section .tg-funding-calculator .tg-funding-row {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.calculator-section .tg-funding-calculator .tg-funding-name {
    color: #171d4b;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.calculator-section .tg-funding-calculator .tg-funding-progress {
    display: block;
    width: 100%;
    height: 24px;
    overflow: hidden;
    border-radius: 20px;
    background: #eef0f2;
}

.calculator-section .tg-funding-calculator .tg-funding-progress-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .35s ease;
}

.calculator-section .tg-funding-calculator .tg-funding-value {
    color: #171d4b;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.calculator-section .tg-funding-calculator .tg-funding-disclaimer {
    margin: 10px 0 0 !important;
    color: #85899b;
    font-size: 12px;
    line-height: 1.5;
}

/* The live design has one centered outline CTA, not two fixed-width buttons. */
.calculator-section .tg-funding-calculator .tg-result-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    width: 100%;
    margin-top: auto !important;
    padding-top: 48px;
}

.calculator-section .tg-funding-calculator .tg-result-actions #tg-contact:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 202px !important;
    min-width: 202px;
    min-height: 52px;
    margin: 0 !important;
    padding: 12px 18px !important;
    border: 1px solid #171d4b !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #171d4b !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.calculator-section .tg-funding-calculator .tg-result-actions #tg-contact:not([hidden]):hover {
    background: #f7f7fa !important;
    color: #171d4b !important;
}

.calculator-section .tg-funding-calculator [hidden] {
    display: none !important;
}

/* Responsive layout */
@media (max-width: 1100px) {
    .calculator-section .tg-funding-calculator .tg-calculator-grid {
        gap: 24px !important;
    }

    .calculator-section .tg-funding-calculator .tg-card {
        padding: 32px 28px !important;
    }

    .calculator-section .tg-funding-calculator .tg-popular-vendors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .calculator-section .tg-funding-calculator .tg-calculator-heading-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
    }

    .calculator-section .tg-funding-calculator .tg-category-filters {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .calculator-section .tg-funding-calculator .tg-calculator-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
    }

    .calculator-section .tg-funding-calculator .tg-card {
        min-height: 0;
        padding: 26px 20px !important;
        border-radius: 16px !important;
    }

    .calculator-section .tg-funding-calculator .tg-calculator-heading-copy p {
        font-size: 15px;
    }

    .calculator-section .tg-funding-calculator .tg-highest-funding {
        margin-bottom: 32px !important;
    }

    .calculator-section .tg-funding-calculator .tg-highest-funding strong {
        font-size: 44px;
    }

    .calculator-section .tg-funding-calculator .tg-funding-row {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        gap: 7px;
    }

    .calculator-section .tg-funding-calculator .tg-funding-name,
    .calculator-section .tg-funding-calculator .tg-funding-value {
        font-size: 12px;
    }

    .calculator-section .tg-funding-calculator .tg-funding-progress {
        height: 17px;
    }

    .calculator-section .tg-funding-calculator .tg-calculator-note {
        margin-top: 32px !important;
    }

    .calculator-section .tg-funding-calculator .tg-result-actions {
        padding-top: 32px;
    }
}

@media (max-width: 420px) {
    .calculator-section .tg-funding-calculator .tg-budget-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .calculator-section .tg-funding-calculator .tg-category-filter {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* =========================================
   FINAL ALIGNMENT AND BUTTON FIXES
   ========================================= */

/* 1. Align highest funding summary to the left */
.calculator-section .tg-funding-calculator .tg-highest-funding {
    align-items: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-bottom: 48px !important;
}

/* 2. Keep all supplier bars aligned */
.calculator-section .tg-funding-calculator .tg-funding-row {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) 80px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

/* Supplier names */
.calculator-section .tg-funding-calculator .tg-funding-name {
    white-space: nowrap !important;
    text-align: left !important;
}

/* Supplier amounts */
.calculator-section .tg-funding-calculator .tg-funding-value {
    text-align: right !important;
    white-space: nowrap !important;
}

/* 3. Make Discuss your estimate orange */
.calculator-section .tg-funding-calculator .tg-result-actions #tg-contact:not([hidden]) {
    background: #f28c13 !important;
    border: 1px solid #f28c13 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

/* Button hover */
.calculator-section .tg-funding-calculator .tg-result-actions #tg-contact:not([hidden]):hover {
    background: #df7b08 !important;
    border-color: #df7b08 !important;
    color: #ffffff !important;
}

/* Keep button text and arrow white */
.calculator-section .tg-funding-calculator .tg-result-actions #tg-contact span {
    color: #ffffff !important;
}

/* Tablet and mobile */
@media (max-width: 767px) {
    .calculator-section .tg-funding-calculator .tg-highest-funding {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .calculator-section .tg-funding-calculator .tg-funding-row {
        grid-template-columns: 85px minmax(0, 1fr) 65px !important;
        gap: 6px !important;
    }

    .calculator-section .tg-funding-calculator .tg-funding-name,
    .calculator-section .tg-funding-calculator .tg-funding-value {
        font-size: 12px !important;
    }
}

/* Fix supplier bar alignment */
.calculator-section .tg-funding-calculator .tg-funding-breakdown .tg-funding-row {
    display: grid !important;
    grid-template-columns: 100px minmax(0, 1fr) 80px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

/* Fixed supplier name column */
.calculator-section .tg-funding-calculator .tg-funding-row > .tg-funding-name {
    width: 100px !important;
    min-width: 100px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

/* All progress bars start at the same position */
.calculator-section .tg-funding-calculator .tg-funding-row > .tg-funding-progress {
    width: 100% !important;
    min-width: 0 !important;
}

/* Funding amounts aligned to the right */
.calculator-section .tg-funding-calculator .tg-funding-row > .tg-funding-value {
    width: 80px !important;
    min-width: 80px !important;
    text-align: right !important;
    white-space: nowrap !important;
}

@media (max-width: 767px) {
    .calculator-section .tg-funding-calculator .tg-funding-breakdown .tg-funding-row {
        grid-template-columns: 85px minmax(0, 1fr) 70px !important;
        gap: 6px !important;
    }

    .calculator-section .tg-funding-calculator .tg-funding-row > .tg-funding-name {
        width: 85px !important;
        min-width: 85px !important;
    }

    .calculator-section .tg-funding-calculator .tg-funding-row > .tg-funding-value {
        width: 70px !important;
        min-width: 70px !important;
    }
}

/* Reduce spacing above the left card disclaimer */
.calculator-section .tg-funding-calculator .tg-input-card .tg-input-disclaimer {
    margin-top: 0px !important;
    padding-top: 0 !important;
}
.calculator-section .tg-funding-calculator .tg-input-card p:last-child {
    margin-top: 0px !important;
}
