/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */
body {
    font-family: var(--font-family-sohne-buch);
}
p, span, strong {
    font-family: var(--font-family-sohne-buch);
}

table {
    font-family: var(--font-family-sohne-buch);
}

.table-mutual-fund-cell-heading-fund {
    max-width: 283px;
}

.mutual-fund-share-classes {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;

    label,
    select {
        font-family: var(--font-family-sohne-buch);
    }

    .mutual-fund-share-classes-list {
        min-width: 300px;
    }
}

.mutual-fund-asset-allocation-table {
    .mutual-funds-header-tr {
        text-align: center;
    }

    .hide-headings {
        th {
            color: #fff;
        }
    }
}

/* Single funds */
.fund-description-container {
    align-items: flex-start;
}
.fund-description-container .fund-objective-container {
    flex: 1 1 30%;
    margin-right: 9%;
}

.fund-description-container .fund-strategy-container {
    margin-left: 10%;
    flex: 1 1 35%;
    margin-right: 15%;
}

.fund-specific-holdings-data .hide {
    display: none;
}

.portfolio-managers .ex-drawer-team-name {
    color: var(--theme-primary-color);
}

#fundDisclosure {
    font-family: var(--font-family-sohne-buch);
}

.single-funds .portfolio-managers .ex-drawer-team-name{
    color: var(--theme-primary-color);
    font-family: var(--font-family-styrene_b_lc-bold);
    font-size: var(--font-size-xxl);
    font-style: normal;
    font-weight: var(--font-weight-bold);
}

.mutual-funds{
    position: relative;
}
.fund-performance-content{
    position: relative;
}
.fund-growth-of-10k-content{
  position: relative;
}
.relative{
    position: relative;
}
.overlay-loader.hidden{
    display: flex;
}
.overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Investment description */
  .investment-description-class-x, .investment-description-class-y {
    display: none;
    margin-top: 30px;
  }

/* =====================================================
   Texas Connect Earnings Calculator (Native CSS Nesting)
   ===================================================== */

@keyframes calc-spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#texasConnectCalculator {
    margin-top: -330px;
    @media (max-width: 575.98px) {
        margin-top: 4%;
    }
}

/* fix overlap issues */
.texas-connect-main-banner-container.desktop,
.texas-connect-main-banner-container.mobile {
    pointer-events:none;
}


.texas-connect-calculator {
    /* CSS Variables */
    --tc-primary: var(--meeder-blue, #00b2ba);
    --tc-primary-dark: var(--meeder-dark-blue, #00698e);
    --tc-orange: var(--meeder-orange, #f79b31);
    --tc-orange-dark: var(--carrot-orange, #f7921e);
    --tc-text-dark: var(--scarpa-flow, #58595b);
    --tc-text-muted: var(--mountain-mist, #939598);
    --tc-white: var(--white, #ffffff);
    --tc-border: var(--alto, #dcddde);
    --tc-bg-light: var(--wild-sand, #f4f4f4);
    --tc-error: var(--meeder-red, #f26322);
    --tc-radius: 8px;
    --tc-radius-sm: 4px;
    --tc-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --tc-transition: 0.2s ease;

    /* Base styles */
    max-width: 900px;
    margin: 40px auto;
    padding: 35px;
    background: var(--tc-bg-light);
    border-radius: var(--tc-radius);
    font-family: var(--font-family-sohne-buch, 'Helvetica Neue', Arial, sans-serif);

    /* Two Column Layout */
    &.two-column-layout .calculator-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }

    .hidden {
        display: none !important;
    }

    /* Header */
    .calculator-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .calculator-title {
        font-family: var(--font-family-styrene_b_lc-bold, 'Helvetica Neue', Arial, sans-serif);
        font-size: 32px;
        color: var(--tc-text-dark);
        margin: 0;
        font-weight: bold;
    }

    /* Form */
    .calculator-form {
        margin-bottom: 0;
    }

    .calculator-field {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;

        label {
            font-weight: 700;
            color: var(--tc-text-dark);
            margin-bottom: 8px;
            font-size: 14px;
        }
    }

    .input-wrapper {
        position: relative;
        display: flex;
        align-items: center;

        .calculator-input {
            padding-left: 32px;
        }
    }

    .currency-prefix {
        position: absolute;
        left: 14px;
        color: var(--tc-text-muted);
        font-weight: 600;
        font-size: 16px;
        pointer-events: none;
    }

    .calculator-input {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border: 2px solid var(--tc-border);
        border-radius: var(--tc-radius-sm);
        transition: border-color var(--tc-transition), box-shadow var(--tc-transition);
        font-family: inherit;
        background: var(--tc-white);

        &:hover {
            border-color: var(--tc-text-muted);
        }

        &:focus {
            outline: none;
            border-color: var(--tc-primary);
            box-shadow: 0 0 0 3px rgba(0, 178, 186, 0.15);
        }

        &[type="date"] {
            cursor: pointer;
            
            /* Mobile optimization */
            @media (max-width: 768px) {
                font-size: 16px; /* Prevents zoom on iOS */
                min-height: 44px; /* Better touch target */
            }
        }
    }

    .field-hint {
        font-size: 11px;
        color: var(--tc-text-muted);
        margin-top: 6px;
        font-style: italic;
    }

    /* Actions / Submit Button */
    .calculator-actions {
        text-align: left;
        margin-top: 10px;
    }

    .calculator-submit-btn {
        background: transparent;
        color: var(--tc-orange);
        border: 2px solid var(--tc-orange);
        padding: 14px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: var(--tc-radius-sm);
        cursor: pointer;
        transition: all var(--tc-transition);
        font-family: inherit;
        width: 100%;
        max-width: 280px;

        &:hover:not(:disabled) {
            background: var(--tc-orange);
            color: var(--tc-white);
        }

        &:active:not(:disabled) {
            transform: scale(0.98);
        }

        &:disabled {
            border-color: var(--tc-border);
            color: var(--tc-text-muted);
            cursor: not-allowed;
        }

        .btn-loading {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
    }

    .spinner {
        display: inline-block;
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: var(--tc-white);
        animation: calc-spin 0.8s linear infinite;
    }

    /* Error State */
    .calculator-error {
        background-color: #fef2f2;
        border: 1px solid var(--tc-error);
        border-left: 4px solid var(--tc-error);
        border-radius: var(--tc-radius-sm);
        padding: 14px 18px;
        margin: 20px 0;

        .error-message {
            color: var(--tc-error);
            font-size: 14px;
            font-weight: 500;
        }
    }

    /* Results Section */
    .calculator-results {
        text-align: center;
        padding: 40px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 300px;

        .results-display {
            margin-bottom: 20px;
            
            &.hidden {
                display: none !important;
            }
            
            &:not(.hidden) {
                display: block;
            }
        }

        /* Initial state - before calculation */
        &:not(.has-results) {
            .results-intro,
            .results-context {
                opacity: 0.5;
            }

            .results-earnings-large {
                color: var(--tc-text-muted);
            }
        }

        &.has-results .results-earnings-large {
            animation: fadeInUp 0.4s ease-out;
        }
    }

    .results-intro {
        font-size: 16px;
        color: var(--tc-text-muted);
        margin: 0 0 10px 0;
    }

    .results-earnings-large {
        font-size: 56px;
        font-weight: 700;
        color: var(--tc-orange);
        margin: 0 0 10px 0;
        line-height: 1.1;
    }

    .results-context {
        font-size: 16px;
        color: var(--tc-text-muted);
        margin: 0 0 5px 0;
    }

    .results-start-date {
        font-size: 24px;
        font-weight: 700;
        color: var(--tc-text-dark);
        margin: 0;
    }

    /* Results Details */
    .results-details {
        text-align: left;
        margin: 25px 0;
        padding: 20px;
        background: var(--tc-white);
        border-radius: var(--tc-radius-sm);
        border: 1px solid var(--tc-border);
    }

    .result-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--tc-border);

        &:last-child {
            border-bottom: none;
        }
    }

    .result-label {
        font-size: 14px;
        color: var(--tc-text-muted);
    }

    .result-value {
        font-size: 14px;
        font-weight: 600;
        color: var(--tc-text-dark);
    }

    /* Disclaimer */
    .results-disclaimer-link {
        font-size: 14px;
        color: var(--tc-primary);
        text-decoration: none;
        cursor: pointer;

        &:hover {
            text-decoration: underline;
        }
    }

    .results-disclaimer {
        margin-top: 15px;
        padding: 15px;
        background: var(--tc-white);
        border-radius: var(--tc-radius-sm);
        text-align: left;

        p {
            font-size: 12px;
            color: var(--tc-text-muted);
            margin: 0;
            line-height: 1.6;
        }
    }

    /* Responsive */
    @media (max-width: 768px) {
        padding: 24px 20px;
        margin: 20px 15px;
        border-radius: var(--tc-radius-sm);

        .calculator-title {
            font-size: 24px;
        }

        &.two-column-layout .calculator-body {
            grid-template-columns: 1fr;
            gap: 30px;
        }

        .calculator-submit-btn {
            max-width: 100%;
        }

        .results-earnings-large {
            font-size: 42px;
        }

        .results-start-date {
            font-size: 20px;
        }

        .calculator-results {
            min-height: 250px;
            padding: 30px 15px;
        }
    }
}