.chart-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: transparent;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        canvas {
            width: 100% !important;
            height: 400px !important; /* Fixed height for better control */
        }
        @media (max-width: 600px) {
            .chart-container {
                padding: 10px;
            }
            canvas {
                height: 300px !important; /* Adjusted for mobile */
            }
        }
        @media (max-width: 400px) {
            canvas {
                height: 250px !important; /* Further adjustment for small phones */
            }
        }

        .metrics-container {
            max-width: 900px;
            margin: 0 auto;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            background: transparent;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 16px;
        }
        .metrics-header {
            text-align: center;
            margin-bottom: 16px;
        }
        .metric-card {
            background-color: transparent;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 12px;
            margin-bottom: 12px;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .metric-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        .metric-title {
            font-weight: bold;
            color: aquamarine;
            margin-bottom: 8px;
        }
        .metric-value, .metric-rank, .metric-source {
            font-size: 14px;
            color: #fff;
            margin-bottom: 4px;
        }
        .metric-source {
            font-style: italic;
            color: #fff;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 16px;
            padding: 20px;
        }
        .metrics-container.error .fallback-message {
            display: block;
        }
        @media (min-width: 640px) {
            .metrics-container {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                padding: 24px;
            }
            .metric-card {
                margin-bottom: 0;
                padding: 16px;
            }
            .metric-title, .metric-value, .metric-rank, .metric-source {
                font-size: 16px;
            }
        }
        @media (max-width: 400px) {
            .metrics-container {
                padding: 12px;
            }
            .metric-card {
                padding: 8px;
            }
            .metric-title, .metric-value, .metric-rank, .metric-source {
                font-size: 12px;
            }
        }
        .tax-all-states-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
            background-color: transparent;
            border-radius: 8px;
            border: solid aquamarine 1px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            min-height: 200px;
            overflow-y: visible;
                   /** max-height: 1600px;  Cap container height */
        }
        
        #allStatesTaxChart {
            width: 100% !important;
            height: 1500px !important; /* Tall for 50 states */
        }

/****** IN CASE I WANT TO SET A HEIGHT (THIS ONE IS FOR THE TABLET)

        @media (max-width: 768px) {
            .tax-all-states-container {
                padding: 10px;
                max-height: 1300px;
            }
            #allStatesTaxChart {
                height: 1200px !important; 
            }
        }
/****** IN CASE I WANT TO SET A HEIGHT (THIS ONE IS FOR THE PHONE)
        @media (max-width: 400px) {
            #allStatesTaxChart {
                height: 1000px !important;  
            }
            .tax-all-states-container {
                max-height: 1100px;
            }
        }

        ****/
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 16px;
            padding: 20px;
        }
        .tax-all-states-container.error .fallback-message {
            display: block;
        }

        .dollar-container {
            max-width: 700px;
            margin: 0 auto;
            background: transparent;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 12px;
            overflow-y: auto;
            max-height: 500px;
        }
        #dollarChart {
            width: 100% !important;
            height: 250px !important;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 12px;
            padding: 12px;
        }
        .dollar-container.error .fallback-message {
            display: block;
        }
        @media (max-width: 768px) {
            .dollar-container {
                padding: 8px;
                max-height: 500px;
            }
            #dollarChart {
                height: 220px !important;
            }
        }
        @media (max-width: 400px) {
            .dollar-container {
                padding: 6px;
                max-height: 500px;
            }
            #dollarChart {
                height: 180px !important;
            }
        }

        /*** COST OF LIVING **/
        .cost-container {
            max-width: 700px;
            margin: 0 auto;
            background: transparent;
            /*background: linear-gradient(to bottom, #ffffff, #f8fafc); */
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            padding: 12px;
            overflow-y: visible;
            max-height: 600px;
        }
        #costChart {
            width: 100% !important;
            height: 300px !important;
        }
        .chart-toggle {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .chart-toggle button {
            background-color: #e5e7eb;
            color: #1f2937;
            padding: 6px 12px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 12px;
            transition: background-color 0.2s;
        }
        .chart-toggle button.active {
            background-color: #1e40af;
            color: white;
        }
        .chart-toggle button:hover {
            background-color: #d1d5db;
        }
        .chart-toggle button.active:hover {
            background-color: #1e3a8a;
        }
        .fallback-message {
            display: none;
            text-align: center;
            color: #e53e3e;
            font-size: 12px;
            padding: 12px;
        }
        .cost-container.error .fallback-message {
            display: block;
        }
        @media (max-width: 768px) {
            .cost-container {
                padding: 8px;
                max-height: 600px;
            }
            #costChart {
                height: 250px !important;
            }
            .chart-toggle button {
                font-size: 10px;
                padding: 5px 10px;
            }
        }
        @media (max-width: 400px) {
            .cost-container {
                padding: 6px;
                max-height: 600px;
            }
            #costChart {
                height: 200px !important;
            }
            .chart-toggle {
                flex-wrap: wrap;
                gap: 6px;
            }
            .chart-toggle button {
                font-size: 9px;
                padding: 4px 8px;
            }
        }