@font-face {
    font-family: 'Putri8a';
    src: url('../fonts/putri8a.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@media print {
    body, h1, h2, h3, h4, p, table, th, td, div, span {
        font-family: 'Putri8a', 'Open Sans', Helvetica, Arial, sans-serif;
    }
    
    /* Add highlighting for specific cells to match PDF */
    .age-header, th:first-child,
    .total-coverage-header, th:nth-child(6),
    .premium-header, th:nth-child(8) {
        background-color: rgb(240, 233, 6) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Highlight for current age and ages multiple of 5 up to age 65 */
    td.highlight,
    tr.multiple-of-five:not(.retired-age) td:first-child {
        background-color: rgb(240, 233, 6) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* The rest of your existing print styles remain unchanged */
    body {
        background-color: white;
        padding: 0;
        margin: 0;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    button, .calculator-form, #back-to-top, .back-to-top, .progress {
        display: none;
    }
    
    .results {
        display: block;
        width: 100%;
        background-color: white;
        padding: 0;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
    
    table {
        page-break-inside: avoid;
        width: 100%;
        font-size: 8pt;
        box-shadow: none;
    }
    @media (max-width: 992px) {
        table {
            page-break-inside: avoid;
            width: 100%;
            font-size: 10px;
            box-shadow: none;
        }

    }
    
    th, td {
        padding: 4px;
    }
    
    tr {
        page-break-inside: avoid;
    }
    
    .table-container {
        width: 100%;
        max-width: 100%;
        overflow-x: visible;
        box-shadow: none;
    }
    
    .fee-summary, #reduction-explanation, .summary-table, .cost-summary-table, .info-table {
        box-shadow: none;
    }
}

/* Main Styles */
body {
    font-family: 'Putri8a', 'Open Sans', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    font-size: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 36px 64px 20px;
    box-shadow: rgba(149, 157, 165, 0.4) 0px 0px 42px 6px;
    border-radius: 12px;
    border: 1px solid rgba(244, 244, 244, 1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Headers */
h1, h2, h3, h4 {
    color: #193153;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    font-size: clamp(1.5rem, 0.3rem + 2.8vw, 2.2rem);
}


@media (max-width: 992px) {

    h1 {
        text-align: center;
        margin-bottom: 40px;
        padding-bottom: 15px;
        border-bottom: 1px solid #ddd;
        font-size: 20px;
    }
    h1 span {
        color: #666;
        font-weight: normal;
        display: block;
        font-size: 16px;
        margin-top: 8px;
    }
    h2 {
        font-size: 18px;
        margin: 8px 0 40px;
        text-align: center;
    }
}
h1 span {
    color: #666;
    font-weight: normal;
    display: block;
    font-size: 0.8em;
    margin-top: 8px;
}

h2 {
    font-size: clamp(1.2rem, 0.3rem + 2vw, 1.875rem);
    margin: 8px 0 40px;
    text-align: center;
}

h3 {
    font-size: clamp(0.9375rem, 0.6875rem + 1vw, 1.25rem);
    margin-bottom: 20px;
    /* text-align: center; */
}

/* Intro Section */
.intro-section {
    margin-bottom: 40px;
    padding: 25px;
    background-color: rgba(249, 249, 249, 0.8);
    border: 1px solid #ddd;
    border-radius: 12px;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.intro-section h2 {
    margin-top: 0;
    align-items: center;
}

.intro-section ul {
    padding-left: 25px;
}

.intro-section li {
    margin-bottom: 8px;
}

/* Form Styles */
.calculator-form {
    margin-bottom: 40px;
    padding: 32px;
    background-color: rgba(249, 249, 249, 0.8);
    border: 1px solid #ddd;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Updated Form Content Styles */
.form-content {
    display: flex;
    flex-direction: column;
    /* gap: 25px; */
    margin-bottom: 30px;
}

/* Row styles */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 10px;
}

.form-group {
    flex: 1;
    /* min-width: 250px; */
    margin-bottom: 15px;
}

.empty-group {
    min-height: 10px;
}

/* For legacy support */
.row-1, .row-2, .row-3, .row-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.row-1 > *, .row-2 > *, .row-3 > *, .row-4 > * {
    flex: 1;
    min-width: 250px;
}

/* Updated label positioning */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #121212;
    font-size: clamp(0.875rem, 0.625rem + 1vw, 1rem);
}


@media (max-width: 992px) {
    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #121212;
        font-size: 12px;
    }

}
.option-label {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
    font-size: clamp(0.875rem, 0.625rem + 1vw, 1rem);
}

/* Updated input styles with consistent sizing */
input, select, textarea {
    width: 90%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    outline: none;
    box-shadow: 1px 1px 10px 2px rgba(18, 18, 18, 0.1);
    font-size: clamp(0.875rem, 0.625rem + 1vw, 1rem);
    margin: 5px 0 5px;
    color: rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease-in-out;
    height: auto;
    background-color: #fff;
    font-family: inherit;
}


@media (max-width: 992px) {
    input, select, textarea {
       
        font-size: 12px;
       
    }

}
#annual-salary, #fullname, #email{
    width: 85.5%;
}
textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(25, 49, 83, 0.3);
}

/* Updated checkbox style */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

/* Updated hint style to appear below input */
.hint {
    display: block;
    margin: 2px 0 8px 0;
    color: #666;
    font-size: 0.85em;
    font-style: normal;
}

@media (max-width: 992px) {

    .hint {
        display: block;
        margin: 2px 0 8px 0;
        color: #666;
        font-size: 10px;
        font-style: normal;
    }
}
.option-select {
    width: 80px;
}

/* New Option Section Styles */
.option-section {
    margin-top: 20px;
    padding: 25px;
    background-color: rgba(249, 249, 249, 0.8);
    border: 1px solid #ddd;
    border-radius: 12px;
}

.option-section h3 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 20px;
    color: #193153;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 992px) {
    .option-section h3 {
        text-align: left;
        margin-top: 0;
        margin-bottom: 20px;
        color: #193153;
        font-size: 14px;
        font-weight: 600;
    }

}

.option-container {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
    width: 100%;
}

.option-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    gap: 25px;
    margin-top: 15px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    flex-basis: 25%;
}

.option-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    flex-wrap: wrap;
    gap: 15px;
}

.option-select-container {
    display: flex;
    /* justify-content:baseline; */
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.option-select-container select {
    /* width: 80px; */
    margin: 0;
}

.option-select-container .hint {
    margin: 0;
}

.buttons {
    margin-top: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.buttonss{
    display: flex;
    flex-direction: row;
}
button {
    padding: 14px 25px;
    background-color: #193153;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px;
    font-size: clamp(0.875rem, 0.675rem + 0.8vw, 1.125rem);
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 150px;
}

button:hover {
    background-color: #2b66b7;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* PDF Button */
#download-pdf-btn {
    background-color: #d9534f;
}

#download-pdf-btn:hover {
    background-color: #c9302c;
}

/* Results section */
.results {
    display: none;
    margin-top: 30px;
    padding: 30px;
    border-top: 1px solid #ddd;
    background-color: rgba(249, 249, 249, 0.6);
    border-radius: 12px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #193153;
}

#summary-date, #results-date {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-style: normal;
}

@media (max-width: 992px) {

    #summary-date, #results-date {
        text-align: center;
        margin-bottom: 30px;
        color: #666;
        font-style: normal;
        font-size: 12px;
    }
}
/* Section Headers */
.section-header {
    text-align: left;
    margin: 40px 0 30px;
    color: #193153;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    /* text-transform: uppercase; */
}

/* Tables */
th, td {
    border: 2px solid rgb(26, 106, 181);
    padding: 12px 15px;
    text-align: center;
    vertical-align: middle;
    background-color: white;
    color: black;
    font-size: 14px;
}

th {
    background-color: #f9f9f9;
    color: #193153;
    font-weight: bold;
}

/* Highlight cells */
.age-header, th:first-child,
.total-coverage-header, th:nth-child(6),
.premium-header {
    background-color: rgb(240, 233, 6);
    color: black;
    font-weight: bold;
}

td.highlight {
    background-color: rgb(240, 233, 6);
    color: black;
    font-weight: bold;
}

/* Highlight ages that are multiples of 5 - up to and including age 65 */
tr.multiple-of-five:not(.retired-age) td:first-child {
    background-color: rgb(240, 233, 6);
    color: black;
    font-weight: bold;
}

.cost-summary-table th {
    background-color: #f9f9f9;
    color: #193153;
    text-align: center;
    padding: 12px 15px;
}

.summary-table th, .info-table th {
    background-color: #f9f9f9;
    color: #193153;
    text-align: center;
    padding: 12px 15px;
}

.tleft {
    text-align: left !important;
}

.total-row {
    font-weight: bold;
    background-color: #f9f9f9;
}

tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Fee summary section */
.fee-summary {
    margin: 20px 0;
    text-align: center;
    /* padding: 20px; */
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.fee-average {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    color: #193153;
}

.fee-increase {
    color: #d9534f;
    font-weight: bold;
    padding: 12px;
    border: 1px solid #ddd;
    display: inline-block;
    margin-top: 15px;
    background-color: white;
    border-radius: 8px;
    font-size: 16px;
}

#reduction-explanation {
    margin: 30px 0;
    padding: 25px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
}

#reduction-explanation h4 {
    font-size: 14px;
}

#back-to-top, .back-to-top {
    display: block;
    text-align: center;
    margin-top: 30px;
    color: #193153;
    text-decoration: none;
    padding: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#back-to-top:hover, .back-to-top:hover {
    text-decoration: underline;
    transform: translateY(-3px);
}

/* Progress indicator */
.progress {
    margin: 30px auto 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
    background-color: transparent !important;
    border-radius: 4px;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
}

.progress .circle,
.progress .bar {
    display: inline-block;
    background: #fff;
    width: 16px;
    height: 16px;
    border-radius: 100%;
    border: 1px solid #d5d5da;
    transition: all 0.3s ease;
}

.progress .circle .label {
    display: inline-block;
    width: 15.5px;
    height: 15.5px;
    line-height: inherit;
    border-radius: 100%;
    color: transparent;
    transition: all 0.3s ease;
}

.progress .circle .title {
    color: #193153;
    width: 100%;
    font-weight: 700;
    text-wrap: nowrap;
    font-size: 12px;
    line-height: 1;
    margin-left: -8px;
    display: none;
    transition: all 0.3s ease;
}

/* Done / Active */
.progress .bar.done,
.progress .circle.done {
    background: #eee;
}

.progress .circle.done .label {
    color: transparent;
    background: #9be42d;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
}

.progress .circle.done .title {
    display: block;
}

.progress .circle.active .label {
    color: transparent;
    background: #193153;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
}

.progress .circle.active .title {
    color: #193153;
    font-weight: bold;
}

/* Form transitions */
.step {
    transition: opacity 0.5s ease;
}

/* Tables */
.table-container, .results-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.95rem;
    background-color: white;
    color: black;
    border-radius: 0;
    overflow: hidden;
}
@media (max-width: 992px) {
table{
    font-size: 12px;
}

}

.summary-table, .cost-summary-table, .info-table {
    margin-bottom: 30px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* Other table-related elements that might need border-radius removed */
.translator-table {
    width: 100%;
    margin-top: 30px;
    border-radius: 0;
    overflow: hidden;
}

#print-btn {
    display: block;
}

/* Additional styles for SF50 Codes page */
.translator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: rgba(249, 249, 249, 0.8);
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.translator-header {
    text-align: center;
    margin-bottom: 25px;
}

.translator-header h2 {
    font-size: 14px;
}

.translator-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.translator-form input {
    padding: 12px;
    width: 100px;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    box-shadow: 1px 1px 10px 2px rgba(18, 18, 18, 0.1);
}

.translator-output {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #eee;
    min-height: 50px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    font-size: 12px;
}

.translator-table th, .translator-table td {
    text-align: left;
    padding: 12px 15px;
    font-size: 10px;
}

.translator-table th {
    background-color: #193153;
    color: white;
    font-size: 14px;
}

.adjust {
    width: 100% !important;
}

/* Responsive adjustments */
@media (max-width: 1050px) {
    .container {
        padding: 24px 36px 20px;
    }
    
    .form-row, .row-1, .row-2, .row-3, .row-4 {
        gap: 20px;
    }
    
    button {
        min-width: 120px;
        padding: 12px 20px;
    }
}

@media (max-width: 992px) {
.intro-section{
    font-size: 10px;
}

    #annual-salary, #fullname, #email{
        width: 95%;
    }

    input, select, textarea {
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .option-select-container{
        flex-direction: row;
    justify-content:space-between;
    width: 50%;
    }
    h1 {
        font-size: 18px;
    }
    
    h1 span {
        font-size: 14px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    h3, .section-header {
        font-size: 14px;
    }
    
    button {
        font-size: 12px;
    }
    
    table {
        font-size: 10px;
    }
    
    #annual-salary, #fullname, #email{
        width: 97%;
    }
    .container {
        padding: 20px 15px;
    }
    
    .calculator-form {
        padding: 20px;
    }
    
    h1 {
        margin-bottom: 25px;
    }
    
    h2 {
        margin-bottom: 25px;
    }
    
    .progress {
        gap: 20px;
    }
    
    button {
        margin: 5px;
    }
    
    /* Modify form layout for mobile */
    .form-row, .row-1, .row-2, .row-3, .row-4 {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .form-group {
        width: 100%;
        min-width: 100%;
    }
    
    .empty-group {
        display: none;
    }
    
    .option-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-checkbox {
        flex-basis: 100%;
        margin-bottom: 10px;
    }
    
    .option-content {
        width: 100%;
        margin-left: 28px; 
    }
    
  
    
    /* Improve table display on mobile */
    .table-container, .results-table-container {
        margin: 0 -15px 20px;
        width: calc(100% + 30px);
        box-shadow: none;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .summary-table, .cost-summary-table, .info-table {
        margin: 0 -15px 20px;
        width: calc(100% + 30px);
        box-shadow: none;
    }
    
    .fee-summary {
        margin: 20px -15px;
        border-radius: 0;
    }
    
    .fee-average {
        font-size: 12px;
    }
    
    #reduction-explanation {
        margin: 20px -15px;
        border-radius: 0;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    #annual-salary, #fullname, #email{
        width: 95%;
    }
    .option-select-container{
        flex-direction: row;
    justify-content: space-between;
    width: 90%;
    }
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px 10px;
    }
    
    .calculator-form, .intro-section, .option-section {
        padding: 15px 10px;
    }
    
    label {
        /* width: 100%; */
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .progress {
        gap: 15px;
    }
    
    button {
        padding: 10px 15px;
        font-size: 11px;
        min-width: 100px;
        margin: 5px 3px;
    }
    
    th, td {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .option-select-container select {
        width: 100%;
        max-width: 120px;
    }
    
    .hint {
        font-size: 10px;
    }
    
    .results {
        padding: 15px 10px;
    }
    
    .section-header {
        font-size: 14px;
        margin: 20px 0 15px;
    }
    
    /* Better table display for very small screens */
    .summary-table th, .summary-table td,
    .cost-summary-table th, .cost-summary-table td,
    .info-table th, .info-table td {
        padding: 6px 4px;
    }
    
    .summary-table, .cost-summary-table, .info-table {
        table-layout: fixed;
    }
    
    .fee-average, .fee-increase  {
        font-size: 11px;
    }
    
    /* .fee-increase {
        font-size: 0.8em;
        padding: 8px;
    } */
    
    input, select, textarea {
        padding: 8px;
        font-size: 11px;
    }
}

/* Additional media query for very small screens */
@media (max-width: 400px) {

    #results {
        padding: 20px;
    }
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px 5px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    h1 span {
        font-size: 12px;
    }
    
    h2 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 13px;
    }
    
    .calculator-form, .intro-section, .option-section {
        padding: 10px 5px;
        border-radius: 8px;
    }
    
    input, select, textarea {
        padding: 8px;
        font-size: 10px;
        width: 100%;
    }
    
    button {
        padding: 8px 12px;
        font-size: 10px;
        min-width: 80px;
        margin: 3px 2px;
    }
    
    /* Make tables more readable on very small screens */
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 4px 2px;
    }
    
    /* Optimize basic information table for small screens */
    .summary-table th, .info-table th {
        width: 25%;
        font-size: 10px;
    }
    
    .summary-table td, .info-table td {
        width: 25%;
        font-size: 10px;
        word-break: break-word;
    }
    
    /* Better layout for fee summary */
    .fee-summary {
        padding: 10px 5px;
    }
    
    .fee-average {
        font-size: 10px;
        line-height: 1.4;
    }
    
    .fee-increase {
        font-size: 10px;
        padding: 6px;
        margin-top: 10px;
    }
    
    #reduction-explanation {
        padding: 10px;
        font-size: 10px;
    }
    
    #reduction-explanation h4 {
        font-size: 12px;
    }
    
    .translator-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .translator-form div {
        width: 100%;
    }
    
    .translator-form input {
        width: 100%;
    }
}
#print-btn{
    display: none;
}
.multiple-hint{
    font-size: 12px;
}
.multiples-hint{
    margin-left: 5%;
}


/* pdf front end design */
/* PDF-Style Table Enhancements */

/* Enhanced table styling to match PDF */
#fegli-results-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

#fegli-results-table th,
#fegli-results-table td {
    border: 2px solid rgb(26, 106, 181);
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    background-color: white;
    color: black;
    font-size: 14px;
}

/* Header styling with yellow highlights matching PDF */
#fegli-results-table th {
    background-color: #f9f9f9;
    color: #193153;
    font-weight: bold;
}

/* Specific header columns that should be yellow (Age, Total Coverage, Bi-Weekly Premium) */
#fegli-results-table th:nth-child(1),  /* Age */
#fegli-results-table th:nth-child(6),  /* Total FEGLI Coverage */
#fegli-results-table th:nth-child(8) { /* Bi-Weekly Premium */
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Age column highlighting for multiples of 5 - ONLY up to age 65 */
#fegli-results-table tbody tr td:nth-child(1) {
    background-color: white;
}

#fegli-results-table tbody tr.multiple-of-five:not(.retired-age) td:nth-child(1) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Current age highlighting */
#fegli-results-table tbody tr td.current-age {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Special highlighting for age 65 cumulative premium */
#fegli-results-table tbody tr.age-65 td:nth-child(10) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Special highlighting for age 65 and 70 total coverage */
#fegli-results-table tbody tr.age-65 td:nth-child(6),
#fegli-results-table tbody tr.age-70 td:nth-child(6) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Bottom summary boxes matching PDF style */
.pdf-summary-boxes {
    display: flex;
    gap: 10px;
margin: 20px 0;
    justify-content: center;
}

.pdf-summary-box {
    flex: 1;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.4;
    color: white;
}

.pdf-summary-box.red {
 background-color: rgb(25, 106, 181);
 border: 2px solid red;
}

.pdf-summary-box.gray {
 background-color: rgb(25, 106, 181);
 border: 2px solid red;
}

/* Premium increase statement box */
.premium-increase-statement {
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
}

.premium-increase-box {
    display: inline-block;
    border: 2px solid black;
    padding: 10px 20px;
    background-color: white;
    font-size: 14px;
    font-weight: bold;
    color: rgb(207, 33, 41);
    border-radius: 4px;
}

/* Average premium display matching PDF */
.fee-average {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 15px;
    color: #193153;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pdf-summary-boxes {
        flex-direction: column;
        gap: 15px;
    }
    
    .pdf-summary-box {
        font-size: 14px;
    }
    
    .premium-increase-box {
        font-size: 12px;
        padding: 8px 16px;
    }
}

@media (max-width: 576px) {
    .pdf-summary-box {
        font-size: 12px;
        padding: 12px;
    }
    
    .premium-increase-box {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Bi-Weekly Premium highlighting for multiples of 5 - up to and including age 65 */
#fegli-results-table tbody tr.multiple-of-five:not(.retired-age) td:nth-child(8) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Hide summary boxes initially */
.pdf-summary-boxes,
.premium-increase-statement {
    display: none;
}

/* Show summary boxes when results are visible */
.results .pdf-summary-boxes,
.results .premium-increase-statement {
    display: flex;
}

.results .premium-increase-statement {
    display: block;
}

/* Column width adjustments for frontend table */
#fegli-results-table th:nth-child(7),  /* Option C */
#fegli-results-table td:nth-child(7) {
    width: 12%;
}

#fegli-results-table th:nth-child(8),  /* Bi-Weekly Premium */
#fegli-results-table td:nth-child(8) {
    width: 8%;
}

/* Contact footer styling */
.contact-footer {
    text-align: center;
    /* margin-top: 20px; */
    /* padding: 15px 0; */
    color: #333;
    font-size: 12px;
    font-family: 'Putri8a', 'Open Sans', Helvetica, Arial, sans-serif;
    /* border-top: 1px solid #ddd; */
}

@media (max-width: 768px) {
    .contact-footer {
        font-size: 10px;
        padding: 10px 0;
    }
}

@media print {
    .contact-footer {
        display: none;
    }
}

/* Light gray background for retired ages */
#fegli-results-table tbody tr.retired-age td {
    background-color: rgb(220, 220, 220) !important;
}
/* Pastel orange background for first retirement age */
#fegli-results-table tbody tr.first-retirement-age td {
    background-color: rgb(255, 218, 185) !important;
    font-weight: bold !important;
}

/* Ensure existing special age highlighting still works */
#fegli-results-table tbody tr.age-65 td:nth-child(10) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

#fegli-results-table tbody tr.age-65 td:nth-child(6),
#fegli-results-table tbody tr.age-70 td:nth-child(6) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Current age highlighting */
#fegli-results-table tbody tr td.current-age {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Ensure yellow highlights override retired gray background for remaining special cases */
#fegli-results-table tbody tr.retired-age.age-65 td:nth-child(6),
#fegli-results-table tbody tr.retired-age.age-65 td:nth-child(10),
#fegli-results-table tbody tr.retired-age.age-70 td:nth-child(6) {
    background-color: rgb(240, 233, 6) !important;
    color: black !important;
    font-weight: bold !important;
}

/* Remove highlighting for ages above 65 - only highlight multiples of 5 up to 65 */
#fegli-results-table tbody tr.multiple-of-five.retired-age td:first-child {
    background-color: rgb(220, 220, 220) !important;
    color: black !important;
    font-weight: normal !important;
}

/* Remove bi-weekly premium highlighting for ages above 65 */
#fegli-results-table tbody tr.multiple-of-five.retired-age td:nth-child(8) {
    background-color: rgb(220, 220, 220) !important;
    color: black !important;
    font-weight: normal !important;
}