/* Family Business Assessment Frontend Styles */

.fba-assessment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #FFB400;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-assessment-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.fba-assessment-title {
    font-size: 28px;
    color: #03254A;
    margin: 0 0 10px 0;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-assessment-description {
    font-size: 18px;
    color: #1C1B1F;
    margin: 0;
    line-height: 1.5;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-progress-container {
    margin-bottom: 30px;
}

.fba-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.fba-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005177);
    transition: width 0.3s ease;
}

.fba-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.fba-progress-overall,
.fba-progress-section {
    display: flex;
    align-items: center;
}

.fba-progress-section {
    order: 1;
    flex: 0 0 auto;
}

.fba-progress-overall {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
}

.fba-progress-label {
    font-weight: normal;
    color: #999;
    margin-right: 5px;
}

.fba-loading {
    text-align: center;
    padding: 50px 20px;
}

.fba-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fba-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.fba-section-name {
    font-size: 16px;
    color: #03254A;
    font-weight: bold;
    margin: 0 !important;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-section-description {
    font-size: 16px;
    color: #03254A;
    margin: 0;
    font-weight: bold;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-question {
    margin-bottom: 15px;
    margin-top: 40px;
    position: relative;
}

.fba-question-text {
    font-size: 18px;
    color: #03254A;
    margin: 0 0 10px 0;
    line-height: 1.4;
    text-align: center;
}

.fba-question-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    font-style: italic;
}


.fba-answer-options {
    margin-bottom: 20px;
}

.fba-multiple-choice,
.fba-multiple-select,
.fba-yes-no {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.fba-option-label {
    width: 49%;
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fba-option-label:hover {
    background: #e9ecef;
    border-color: #0073aa;
}

.fba-option-label input[type="radio"],
.fba-option-label input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.fba-option-label input[type="radio"]:checked + .fba-option-text,
.fba-option-label input[type="checkbox"]:checked + .fba-option-text {
    font-weight: bold;
    color: #0073aa;
}

.fba-option-label:has(input[type="radio"]:checked),
.fba-option-label:has(input[type="checkbox"]:checked) {
    background: #e7f3ff;
    border-color: #0073aa;
}

.fba-option-text {
    font-size: 16px;
    color: #333;
    flex: 1;
}

.fba-informational {
    padding: 10px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    color: #0c5460;
}

.fba-informational-description {
    margin: 0 0 5px 0;
    color: #0c5460;
}

.fba-text-input-container {
    margin-top: 0px;
}

.fba-text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.fba-text-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.fba-text-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.fba-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.fba-btn {
    padding: 5px 8px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fba-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fba-btn-arrow {
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 0.5;
    background-color: transparent !important;
}

.fba-btn-arrow .fba-arrow-left,
.fba-btn-arrow .fba-arrow-right {
    display: block;
    font-weight: bold;
    margin: 0;
}

.fba-btn-arrow.fba-btn-previous {
    color: #d1ecf1;
}

.fba-btn-arrow.fba-btn-previous:hover {
    color: #FFB400 !important;
}

.fba-btn-arrow.fba-btn-previous:hover:not(:disabled) {
    color: #03254A;
    background-color: transparent !important;
}

.fba-btn-arrow.fba-btn-previous:not(:disabled) {
    color: #03254A;
    background-color: transparent !important;
}

.fba-btn-arrow.fba-btn-previous:hover:disabled {
    color: #545b62;
    background-color: transparent !important;
}

.fba-btn-arrow.fba-btn-next {
    color: #d1ecf1;
}

.fba-btn-arrow.fba-btn-next:hover {
    color: #FFB400 !important;
}

.fba-btn-arrow.fba-btn-next:hover:not(:disabled) {
    color: #03254A;
    background-color: transparent !important;
}

.fba-btn-arrow.fba-btn-next:not(:disabled) {
    color: #03254A;
    background-color: transparent !important;
}

.fba-text-left,
.fba-text-right {
    font-size: 16px;
    margin-top: 4px;
}

.fba-btn-arrow.fba-btn-next:hover:disabled {
    color: #545b62;
    background-color: transparent !important;
}

.fba-btn-primary {
    background: #0073aa;
    color: white;
}

.fba-btn-primary:hover:not(:disabled) {
    background: #005177;
}

.fba-btn-secondary {
    background: #6c757d;
    color: white;
}

.fba-btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

.fba-btn-success {
    background: #03254A;
    color: white;
    transition: all 0.3s ease;
}

.fba-btn-success:hover {
    background: #FFB400 !important;
    color: #03254A;
}

.fba-btn-success:hover:not(:disabled) {
    background: #FFB400 !important;
}

.fba-results-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.fba-thank-you-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.fba-thank-you-message h2 {
    font-size: 28px;
    color: #03254A;
    margin: 0 0 20px 0;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-thank-you-text {
    font-size: 18px;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.fba-report-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.fba-download-section {
    margin-top: 30px;
}

.fba-download-pdf {
    display: inline-block;
    padding: 8px 30px;
    background: #03254A;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
}

.fba-download-pdf:hover {
    background: #FFB400;
    color: #03254A;
    text-decoration: none;
}

/* User Results Table */
.fba-user-results-table {
    font-family: "Trebuchet MS", Sans-serif !important;
    margin: 20px 0;
}

.fba-user-results-table h3 {
    font-size: 24px;
    color: #03254A;
    margin: 0;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fba-results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: "Trebuchet MS", Sans-serif !important;
    border-radius: 4px;
    overflow: hidden;
}

.fba-results-table thead {
    background: #03254A;
    color: white;
}

.fba-results-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-family: "Trebuchet MS", Sans-serif !important;
    font-size: 16px;
}

.fba-results-table th:last-child {
    border-right: none;
}

.fba-results-table td {
    padding: 15px;
    border: none;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    font-family: "Trebuchet MS", Sans-serif !important;
    background: #fff;
}

.fba-results-table td:last-child {
    border-right: none;
}

.fba-results-table tbody tr {
    background: #fff;
}

.fba-results-table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.fba-results-table tbody tr:nth-child(even) td {
    background: #f5f5f5;
}

.fba-results-table tbody tr:last-child td {
    border-bottom: none;
}

.fba-results-table tbody tr:hover {
    background: #e9ecef;
}

.fba-results-table tbody tr:hover td {
    background: #e9ecef;
}

.fba-btn-download {
    display: inline-block;
    padding: 6px 16px;
    background: #03254A;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-btn-download:hover {
    background: #FFB400;
    color: #03254A;
    text-decoration: none;
}

.fba-no-results {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 18px;
}

/* Results Header with Per Page Selector */
.fba-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.fba-per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-per-page-selector label {
    font-weight: bold;
    color: #03254A;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-per-page-select {
    padding: 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    font-family: "Trebuchet MS", Sans-serif !important;
    background: #fff;
    color: #03254A;
    cursor: pointer;
    transition: border-color 0.2s ease;
    width: 50px;
}

.fba-per-page-select:focus {
    outline: none;
    border-color: #03254A;
}

.fba-per-page-label {
    color: #666;
    font-size: 14px;
    font-family: "Trebuchet MS", Sans-serif !important;
}

/* Pagination */
.fba-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
    flex-wrap: wrap;
    gap: 20px;
}

.fba-pagination-info {
    font-family: "Trebuchet MS", Sans-serif !important;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.fba-pagination-text {
    color: #666;
    font-size: 14px;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fba-pagination-btn {
    padding: 10px 18px;
    border: 2px solid #03254A;
    background: #fff;
    color: #03254A;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Trebuchet MS", Sans-serif !important;
    white-space: nowrap;
    height: 40px;
}

.fba-pagination-btn:hover:not(:disabled) {
    background: #03254A;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(3, 37, 74, 0.2);
}

.fba-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
    transform: none;
    box-shadow: none;
}

.fba-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px;
}

.fba-pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 2px solid #e9ecef;
    background: #fff;
    color: #03254A;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Trebuchet MS", Sans-serif !important;
}

.fba-pagination-number:hover {
    border-color: #03254A;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(3, 37, 74, 0.1);
}

.fba-pagination-number.active {
    background: #03254A;
    color: #fff;
    border-color: #03254A;
    box-shadow: 0 2px 6px rgba(3, 37, 74, 0.3);
    transform: translateY(-2px);
}

.fba-pagination-ellipsis {
    padding: 0 8px;
    color: #999;
    font-family: "Trebuchet MS", Sans-serif !important;
    font-size: 14px;
}

.fba-results {
    text-align: center;
}

.fba-results h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
}

.fba-result-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.fba-score-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    min-width: 200px;
}

.fba-score-box h3 {
    font-size: 16px;
    color: #666;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fba-score,
.fba-risk {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.fba-classification {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

.fba-error {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    text-align: center;
}

.fba-no-questions {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 18px;
}

.fba-login-required {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    padding: 40px;
    text-align: center;
    background: #f2f7ff;
    border-radius: 12px;
    color: #03254A;
    font-family: "Trebuchet MS", Sans-serif;
    max-width: 600px;
    border: 2px solid #FFB400;
}

.fba-login-required h3 {
    font-size: 24px;
    margin: 0 0 40px 0;
    color: #03254A;
}

.fba-login-required p {
    font-size: 16px;
    margin: 30px 0;
}

.fba-login-btn {
    display: inline-block;
    padding: 8px 60px;
    background: #03254A;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
    font-size: 15px;
    font-weight: 600;
}

.fba-login-btn:hover {
    background: #FFB400;
    color: #03254A;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fba-assessment-container {
        margin: 10px;
        padding: 15px;
    }
    
    .fba-assessment-title {
        font-size: 24px;
    }
    
    .fba-question-text {
        font-size: 18px;
    }
    
    .fba-btn {
        width: 100%;
    }
    
    .fba-result-summary {
        flex-direction: column;
        align-items: center;
    }
    
    .fba-score-box {
        width: 100%;
        max-width: 300px;
    }
    
    /* Card-based layout for screens under 768px */
    .fba-table-wrapper {
        overflow-x: visible;
        width: 100%;
    }

    .fba-results-table thead {
        display: none;
    }
    
    .fba-results-table,
    .fba-results-table tbody,
    .fba-results-table tr,
    .fba-results-table td {
        display: block;
        width: 100%;
    }
    
    .fba-results-table {
        min-width: auto;
        width: 100%;
    }
    
    .fba-results-table tr {
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: #f5f5f5; /* Light grey background for card */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        overflow: hidden;
    }
    
    .fba-results-table td {
        padding: 12px 15px 12px 165px; /* Space for label (150px + 15px) */
        border: none;
        border-bottom: 1px solid #e0e0e0;
        text-align: left;
        position: relative;
        background: #fff; /* White background for value area */
        display: flex;
        align-items: center;
        min-height: 44px;
    }
    
    .fba-results-table td:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    
    .fba-results-table td:last-child {
        border-bottom: none;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        padding: 15px 15px 15px 165px;
    }
    
    .fba-results-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 0;
        width: 150px;
        padding: 12px 15px;
        font-weight: bold;
        color: #03254A;
        font-size: 13px;
        font-family: "Trebuchet MS", Sans-serif !important;
        background: #f5f5f5; /* Light grey background for label */
        border-right: 1px solid #e0e0e0;
        display: flex;
        align-items: center;
        height: 100%;
        min-height: 44px;
        box-sizing: border-box;
        margin: 0;
    }
    
    /* Responsive Pagination */

    
    .fba-pagination-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .fba-pagination-info {
        width: auto;
        margin-bottom: 0;
    }
    
    .fba-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fba-pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .fba-pagination-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .fba-informational-description {
        font-size: 14px !important;
    }

    .fba-section-name {
        width: 30%
    }

    .fba-section-description {
        width: 70%;
        text-align: right;
        line-height: 1;
    }

    .fba-section-header {
        align-items: start;
    }

    .fba-navigation .fba-btn-previous {
        display: flex;
        justify-content: left;
    }

    .fba-navigation .fba-btn-next {
        display: flex;
        justify-content: right;
    }

    .fba-thank-you-message {
        padding: 20px !important;
    }

}

@media (max-width: 600px) {
    .fba-assessment-description {
        font-size: 16px;
    }

    .fba-thank-you-text,
    .fba-report-message {
        line-height: 1.2 !important;
    }
}

@media (max-width: 583px) {
    .fba-multiple-choice,
    .fba-multiple-select,
    .fba-yes-no {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .fba-assessment-container {
        margin: 5px;
        padding: 10px;
    }
    
    .fba-question-text {
        font-size: 16px;
    }
    
    .fba-option-label {
        padding: 12px;
    }
    
    .fba-option-text {
        font-size: 14px;
    }
    
    /* Enhanced mobile table styles */
    .fba-results-table td {
        font-size: 13px;
        padding-left: 120px; /* Adjust for smaller screens */
    }
    
    .fba-results-table td:before {
        font-size: 12px;
        left: 0;
        width: 115px; /* Slightly smaller label width on very small screens */
        padding: 12px 10px;
    }
    
    .fba-btn-download {
        padding: 6px 12px;
        font-size: 12px;
        display: block;
        text-align: center;
    }
    
    .fba-user-results-table h3 {
        font-size: 20px;
    }
}

/* Payment Required Styles */
.fba-payment-required {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    padding: 40px;
    text-align: center;
    background: #f2f7ff;
    border-radius: 12px;
    color: #03254A;
    font-family: "Trebuchet MS", Sans-serif;
    max-width: 600px;
    border: 2px solid #FFB400;
}

.fba-payment-required h3 {
    font-size: 24px;
    margin: 0 0 40px 0;
    color: #03254A;
}

.fba-payment-required p {
    font-size: 16px;
    margin: 10px 0;
    color: #03254A;
}

.fba-payment-required button {
    display: inline-block;
    padding: 8px 60px;
    background: #03254A;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
    font-size: 15px;
    font-weight: 600;
}

.fba-payment-required button:hover {
    background: #FFB400 !important;
    color: #03254A;
    text-decoration: none;
}

.fba-payment-success {
    color: #155724 !important;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 12px;
    margin: 15px 0 !important;
}

.fba-payment-success-message {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    background: #d4edda;
    border: 2px solid #FFB400;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.fba-payment-success-message h3 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 15px;
}

.fba-payment-success-message p {
    color: #155724;
    margin-bottom: 15px;
}

.fba-payment-success-message .fba-btn {
    margin-top: 10px;
    background: #03254A !important;
    color: white !important;   
}

.fba-payment-success-message .fba-btn:hover {
    background: #FFB400 !important;
    color: #03254A !important;
    text-decoration: none;
}

.fba-payment-error {
    color: #721c24 !important;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0 !important;
}