/* Adjusted CSS */
#car-data-container {
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    background-color: white;
    width: fit-content;
    max-width: 90%;
    min-width: 300px;
    font-family: 'Roboto', Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers content within container */
}

.dropdown-container {
    display: flex;
    justify-content: center; /* Changed to center for alignment */
    gap: 5px;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
}

.dropdown-container select {
    width: 200px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
    z-index: 1; /* Added to ensure visibility */
}

.dropdown-container select:focus {
    border-color: #007bff;
    outline: none;
}

.dropdown-container select:disabled {
    background-color: #e9e9e9;
}

#car-data-display {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: transparent;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    height:auto;
    max-width: 100%; 
}

#car-data-table_wrapper .dataTables_filter,
#car-data-table_wrapper .dataTables_length,
#car-data-table_wrapper .dataTables_info,
#car-data-table_wrapper .dataTables_paginate {
    display: none;
}

.dataTable {
    width: 100%;
    margin-top: 20px;
}
#car-data-chart {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

#pk-nm-visualization,
#pk-nm-visualization2,
#pk-nm-visualization3 {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px; /* Increased margin-bottom */
    font-size: 22px; /* Increased font size */
    font-weight: bold;
    background-color: white;
    padding: 20px; /* Increased padding */
    border-radius: 10px; /* Increased border-radius */
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Increased shadow for better prominence */
    text-transform: uppercase; /* Added text-transform for better emphasis */
}

#pk-nm-visualization div,
#pk-nm-visualization2 div,
#pk-nm-visualization3 div {
    flex: 1;
    text-align: center;
    margin: 0 20px; /* Increased margin between divs */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #car-data-container {
        min-width: 600px; /* Adjusts min-width for large tablets and smaller laptops */
    }
}

@media (max-width: 900px) {
    #car-data-container {
        min-width: unset;
        width: 100%; /* Ensures container takes full width on smaller devices */
    }

    .dropdown-container {
        flex-direction: column; /* Stack dropdowns vertically */
        width: 100%; /* Ensures dropdown container takes full width on smaller devices */
        gap: 10px;
    }

    .dropdown-container select {
        width: 100%; /* Ensures dropdowns take full width on smaller devices */
    }

    #pk-nm-visualization,
    #pk-nm-visualization2,
    #pk-nm-visualization3 {
        flex-direction: column; /* Stack visualization elements vertically */
        font-size: 16px; /* Adjusted font size */
    }
}

@media (max-width: 600px) {
    #car-data-container {
        min-width: unset;
        width: 100%; /* Ensures container takes full width on mobile */
    }

    .dropdown-container {
        flex-direction: column; /* Stack dropdowns vertically */
        width: 100%; /* Ensures dropdown container takes full width on mobile */
        gap: 10px;
    }

    .dropdown-container select {
        width: 100%; /* Ensures dropdowns take full width on mobile */
    }

    #pk-nm-visualization,
    #pk-nm-visualization3 {
        flex-direction: column; /* Stack visualization elements vertically */
        font-size: 16px; /* Adjusted font size */
    }

    #pk-nm-visualization2 {
        display: none; /* Hide the element on mobile devices */
    }

    #car-data-display {
        padding: 20px; /* Increased padding for better readability */
        border: 1px solid #ddd;
        border-radius: 5px;
        background-color: #fff;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
        width: 100%;
        max-width: none; /* Ensure full width on mobile */
    }

    #car-data-table, #car-data-table th, #car-data-table td {
        display: contents;
        width: 80%; /* Ensure table takes full width */
    }

    #car-data-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        border-bottom: 1px solid #ddd;
    }

    #car-data-table th,
    #car-data-table td {
        text-align: left;
        padding: 10px;
        border-top: none;
        width: 100%;
        box-sizing: border-box;
    }

    #car-data-table th {
        background-color: #f7f7f7;
    }

    #car-data-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
    }

@media (max-width: 600px) {
  #car-data-chart {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
}
}

/* Collapsible styles */
.collapsible {
    background-color: #f1f1f1;
    color: black;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.collapsible:after {
    content: '\002B';
    color: black;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border-radius: 5px;
}