
.compare-fees h1 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.compare-fees .subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.disclaimer-container {
    margin-bottom: 20px;
}

.disclaimer-text {
    font-size: 0.8em;
    color: var(--color-text-light);
    background-color: var(--color-bg-light);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: justify;
}

.disclaimer-agreement {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 5px;
}

.disclaimer-agreement input[type="checkbox"] {
    margin-right: 10px;
}

.disclaimer-agreement label {
    font-weight: bold;
    color: var(--color-text-light);
}

.disclaimer-warning {
    color: var(--color-red-general);
    font-weight: bold;
    padding: 10px;
    background-color: #fadbd8;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 15px;
}

.hidden {
    display: none;
}

.card {
    background: var(--color-bg-white);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
    box-shadow: var(--shadow-light);
}

.compare-fees h3 {
    color: var(--color-text) !important;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-text-light);
}

.input-group input[type="number"],
.input-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    box-sizing: border-box; /* Needed to prevent padding from expanding element width */
}

.input-group input[type="range"] {
    padding: 0; /* Range inputs don't need padding like text/number */
}

#growth-rate-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: var(--color-primary);
}

.compare-fees button {
    display: block;
    width: 80%;
    margin: 0 auto;
    padding: 12px;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.compare-fees button:hover {
    background-color: var(--color-primary-hover);
}

.results-container {
    margin-top: 30px;
    min-height: 70vh;
}

.result-card {
    border: 1px solid var(--color-border-light);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}


.result-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0;
}

.result-value-label {
    font-size: 0.8em;
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-style: italic;
}

.result-fees {
    font-size: 1em;
    margin-bottom: 15px;
}

/* stesso corpo del valore capitale */
.result-fees-total {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-red-general);
    margin-bottom: 0;
}

/* nota sotto il totale commissioni */
.result-fees-label, .website-notes {
    font-size: 0.8em;
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-style: italic;
}

/* layout affiancato dove c'è spazio */
.result-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 600px) {
    .result-summary {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    .result-summary .result-column {
        flex: 1;
    }
}

.result-fees-breakdown {
    font-size: 0.9em;
    color: var(--color-red-general);
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid var(--color-border-light);
}

.compare-fees .details-toggle,
.compare-fees .talk-to-broker-link { /* Added the new class here */
    background: none;
    border: none;
    color: var(--color-blue-general);
    cursor: pointer;
    padding: 5px 0;
    text-decoration: underline;
    font-size: 0.9em;
    margin-top: 20px;
    display: inline-block; /* Ensure it behaves like a button/link */
}

.compare-fees .details-toggle:hover,
.compare-fees .talk-to-broker-link:hover { /* Added the new class here */
    background: none;
    text-decoration: none; /* Optional: remove underline on hover */
}


.details-content {
    display: none; /* Hidden by default */
    margin-top: 15px;
    border-top: 1px solid var(--color-border-light);
    padding-top: 15px;
}

.details-content.visible {
    display: block;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.details-table th, .details-table td {
    border: 1px solid var(--color-border-light);
    padding: 6px;
    text-align: right;
}

.details-table th {
    background-color: var(--color-bg-light);
    font-weight: bold;
}

.details-table td:first-child, .details-table th:first-child {
    text-align: center;
}

#loading {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    color: var(--color-text-light);
}

/* Unified control container styling */
#sort-controls, #filter-controls, #platform-filter-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--color-bg-white);
    border-radius: 5px;
    border: 1px solid var(--color-border-light);
}

/* Unified label styling for all controls */
.sort-label, .filter-label {
    font-weight: bold;
    margin-right: 10px;
}

/* Unified options container styling */
.sort-options, .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Unified button styling for all control buttons */
.compare-fees .control-btn {
    display: inline-block;
    width: auto;
    padding: 6px 12px;
    background-color: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-fees .control-btn:hover {
    background-color: var(--color-border-light);
}

.compare-fees .control-btn.active {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border-color: var(--color-primary);
}

/* Legacy class support - map old classes to new unified class */
.compare-fees .sort-btn, .compare-fees .filter-btn, .compare-fees .platform-filter-btn {
    display: inline-block;
    width: auto;
    padding: 6px 12px;
    background-color: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-fees .sort-btn:hover, .compare-fees .filter-btn:hover, .compare-fees .platform-filter-btn:hover {
    background-color: var(--color-border-light);
}

.compare-fees .sort-btn.active, .compare-fees .filter-btn.active, .compare-fees .platform-filter-btn.active {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border-color: var(--color-primary);
}

/* CTA styling */
.advisor-cta-container {
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    text-align: center;
}

.compare-fees .cta-button {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.compare-fees .cta-button:hover {
    background-color: var(--color-primary-hover);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 10px;
    margin-top: 4px;
}

.compare-fees .submit-button {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 12px;
    border: none;
    border-radius: 4px;
    width: 100%;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.compare-fees .submit-button:hover {
    background-color: var(--color-primary-hover);
}

.success-message {
    text-align: center;
    padding: 30px;
}

.disclaimer a {
    color: var(--color-primary);
    text-decoration: underline;
}

.disclaimer a:hover {
    text-decoration: none;
}

/* ---------- Tooltip styles ---------- */
.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    margin-left: 4px;
    border-radius: 50%;
    background-color: var(--color-border-dark);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.tooltip-box {
    position: absolute;
    z-index: 2000;
    max-width: 220px;
    background-color: var(--color-bg-white);
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    padding: 8px;
    font-size: 0.8em;
    box-shadow: var(--shadow-light);
}

/* Brokerage warning styling */
.brokerage-warning {
    background-color: #fff3cd; /* Light yellow background */
    color: #856404; /* Dark yellow text */
    padding: 8px 12px; /* Adjusted padding */
    margin-top: 15px; /* Ensure spacing from elements above */
    margin-bottom: 10px; /* Spacing before website notes if any */
    border: 1px solid #ffeeba; /* Lighter yellow border */
    border-radius: 4px;
    font-size: 0.85em; /* Reduced font size */
}

.brokerage-warning strong {
    color: #664d03; /* Even darker yellow for emphasis */
}

/* Pagination controls styling */
.pagination-controls {
    display: flex;
    flex-direction: column; /* Stack page links and nav buttons */
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    padding-bottom: 15px;
    gap: 10px; /* Space between the two lines */
}

.pagination-pages, .pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


.compare-fees .pagination-btn {
    display: inline-block;
    width: auto;
    background: none;
    border: none;
    color: var(--color-blue-general);
    cursor: pointer;
    padding: 4px;
    font-size: 1em;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.compare-fees .pagination-btn:hover {
    text-decoration: underline;
}

.compare-fees .pagination-btn.active {
    color: var(--color-text); /* Make active page number black/default text */
    font-weight: bold;
    text-decoration: none;
    cursor: default;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    color: var(--color-text-light);
    font-size: 1em;
    user-select: none;
}
