/* freedom-score.css */

/* Container for gauges to prevent layout shifts */
.fixed-height-container {
    height: 240px !important; /* Increased to accommodate new gauge height */
    min-height: 240px !important;
    overflow: visible !important;
    margin-bottom: 50px !important; /* More space below */
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    background: none !important;
}

/* Container for gauges with better dimensions */
.gauge-container {
    width: 250px !important;
    height: 220px !important; /* Increased to match new gauge height */
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    z-index: 4 !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* Gauge element */
.gauge {
    position: relative;
    width: 150px;
    height: 75px;
    margin: 0 auto;
}

/* Update plan selector button styles for consistency */
.plan-selector-container button,
div[class*="flex justify-center gap-4"] button {
    min-height: 32px !important;
    height: 32px !important;
    line-height: normal !important;
    padding: 6px 14px !important;
    margin: 0 2px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Recovery strategy buttons - match plan button sizes */
div[style*="backgroundColor: #EEF2FF"] button {
    min-height: 32px !important;
    height: 32px !important;
    line-height: normal !important;
    padding: 6px 14px !important;
    margin: 0 2px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Optimization strategy buttons - match plan button sizes */
div[style*="backgroundColor: #ECFDF5"] button {
    min-height: 32px !important;
    height: 32px !important;
    line-height: normal !important;
    padding: 6px 14px !important;
    margin: 0 2px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Reduce height of optimization/recovery containers */
.optimization-container,
div[style*="backgroundColor: #EEF2FF"],
div[style*="backgroundColor: #ECFDF5"] {
    padding: 12px 16px !important; /* Reduced from likely 20px */
    margin-top: 10px !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 5 !important;
}

/* Ensure buttons don't get cut off and have proper spacing */
.plan-selector {
    position: relative;
    z-index: 6;
    margin-bottom: 50px !important; /* More spacing after plan buttons */
    margin-top: 40px !important; /* More space between title and buttons */
}

/* Button containers should wrap properly */
div[class*="flex justify-center gap-4"] {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px 0 !important;
    position: relative !important;
    z-index: 6 !important;
}

/* Ensure recovery/optimization containers don't push buttons too far down */
div[style*="backgroundColor: #EEF2FF"] .flex,
div[style*="backgroundColor: #ECFDF5"] .flex {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
}

/* Also remove border from any h1 elements */
/*
h1 {
    border-bottom: none !important;
    margin-bottom: 30px !important;
}
*/

/* Remove any potential borders from title containers */
/*
div:has(h1),
.title-container,
.portfolio-title {
    border-bottom: none !important;
}
*/

/* Fix button with tooltip containers */
.button-with-info {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
}

    /* Info icon below buttons */
    .button-with-info span[style*="marginTop"] {
        margin-top: 4px !important;
        display: inline-block !important;
        width: 16px !important;
        height: 16px !important;
        border-radius: 50% !important;
        background-color: #f3f4f6 !important;
        text-align: center !important;
        line-height: 16px !important;
        font-size: 11px !important;
        cursor: help !important;
        color: #6b7280 !important;
    }

/* Gauge labels */
.gauge-labels {
    display: flex;
    justify-content: space-between;
    width: 150px;
    font-size: 10px;
    margin-top: 2px;
    font-family: 'Courier New', monospace;
}

/* Chart container fixes */
/*
.chart-outer-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 470px !important;
    margin: 20px auto !important;
    z-index: 1 !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    overflow: visible !important;
}
*/

/* Remove unwanted styles */
div, span, button, canvas, p, h1, h2, h3, h4, h5, h6 {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure proper spacing for mobile */
@media (max-width: 768px) {
    .fixed-height-container {
        padding: 10px !important;
        margin-bottom: 30px !important;
    }

    div[class*="flex justify-center gap-4"] {
        gap: 6px !important;
        padding: 5px 0 !important;
    }

    .optimization-container,
    div[style*="backgroundColor: #EEF2FF"],
    div[style*="backgroundColor: #ECFDF5"] {
        padding: 10px 12px !important;
        margin-top: 8px !important;
    }
}

/* Add this CSS to your freedom-score.css file to fix the height issue */

/* Force both gauges to have consistent number container heights */
div[style*="height: 20px"][style*="fontSize: 11px"] {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 20px !important;
    display: block !important;
    overflow: visible !important;
}

/* Force consistent gauge container dimensions */
div[style*="width: 220px"][style*="height: 200px"] {
    width: 220px !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
}

/* Override any cascading styles that might affect gauge elements */
.gauge-retirement,
.gauge-final,
div[style*="width: 220px"] {
    all: unset !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

    /* Specifically target the numbers container of both gauges */
    div[style*="width: 220px"] div[style*="height: 20px"]:last-child {
        height: 20px !important;
        min-height: 20px !important;
        max-height: 20px !important;
        position: relative !important;
        width: 100% !important;
        margin-top: 5px !important;
        overflow: visible !important;
    }

/* Ensure number spans are positioned correctly */
div[style*="height: 20px"] span[style*="position: absolute"] {
    position: absolute !important;
    top: 0 !important;
    display: inline-block !important;
    line-height: 20px !important;
}

/* Remove any potential line-height inheritance issues */
div[style*="fontSize: 11px"] {
    line-height: normal !important;
}

/* Prevent any other elements from affecting gauge layouts */
/*
div[style*="width: 220px"] * {
    box-sizing: border-box !important;
}
    */