body, html {
    height: 100%;
    margin: 0;
    font-family: Roboto, sans-serif;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Ensures the container fits the full height of the viewport */
    overflow: hidden; /* Prevents any overflow outside this main container */
}

.top-container {
    display: flex;
    flex-direction: row;
    overflow: hidden; /* Check if this needs adjustment */
    width: 100%; /* Ensure full width */
    height: 55vh;
}

.visual1 {
    flex: 8; /* Takes 80% of the width within its container */
    display: flex;
    flex-direction: column; /* Stacks children vertically */
    padding: 10px; /* Consistent padding for better content alignment */
    overflow: hidden; /* Ensures no content spills out */
    height: 100%; /* Ensure it takes full available height */
}

.visual2 {
    flex: 2; /* Takes 20% of the width within its container */
    display: flex;
    flex-direction: column; /* Aligns children vertically */
    overflow: hidden; /* Adjust as needed */
    padding: 10px; /* Ensure there's padding to not cut off content */
    background-color: #f4f4f4;
}

.flex-container {
    flex: 1 1 auto; /* flex-grow, flex-shrink, and flex-basis */
    flex-direction: row; /* Keeps the left pane and icon/graph container side by side */
    width: 100%; /* Full width to align children properly */
    flex-grow: 1; /* Takes up all available space after icon-description */
    overflow: hidden;
}

.left-pane {
    flex: 1 1 auto; /* Allows the pane to grow and shrink as needed */
    max-width: 18%;
    background-color: #dadada; /* Example background color */
    padding: 10px; /* Padding for internal content */
    overflow: hidden;
}

.icon-and-graph {
    flex: 4; /* Remaining space */
    display: flex;
    flex-direction: column; /* Keeps the icon row and graph container stacked */
    height: 100%; /* Full height within flex-container */
}

.icon-row {
    display: flex;
    justify-content: start; /* Aligns icons to the start of the row */
    align-items: flex-start;
    flex-wrap: nowrap; /* Prevents wrapping to ensure icons are side by side */
    width: 100%; /* Full width */
}

.graph-container {
    flex-grow: 1;
    width: 100%; /* Ensures SVG uses the maximum available width */
    overflow: visible; /* Changed to visible to test overflow issues */
}

.left-pane-2 {
    flex: 1; /* Take up 20% of the flex-container width, adjust as needed */
    max-width: 40%;
    background-color: #dadada; /* Example background color */
    padding: 10px; /* Padding for internal content */
    height: 100%; /* Full height within flex-container */
}


.metric-container {
    flex-grow: 1;
    margin: 5px; /* Adjust this as needed */
    overflow: hidden; /* Hide overflow to prevent clipping */
}

.icon-description h2 {
    font-size: 18px;  /* Change this value to adjust the font size */
    color: #333;     /* Set the text color */
    font-weight: bold; /* Adjust the font weight as needed */
    margin-bottom: 5px; /* Adds spacing below the h2 elements */

}

.icon-description p {
    background-color: #c9c9c9;
    padding: 2px;
    font-size: 12px;
    font-style: italic;
    margin: 0 5px; /* Ensures padding doesn't affect layout significantly */
    margin-top: 0px;
}

.icon-container {
    position: relative;
    width: calc(25% - 20px); /* Adjust the width of each icon container */
    margin: 10px; /* Provides spacing around icons */
    margin-top: 20px;
    text-align: left; /* Centers the content within the icon container */
}

.icon-container-2 {
    display: flex;
    align-items: center; /* Align items vertically center */
}

.icon-container-2 img {
    margin-right: 10px; // Space between the icon and the checkboxes
}

.icon-container-2 form {
    display: flex;
    flex-direction: column; /* Stack checkboxes vertically */
    margin-left: 10px; /* Space between the icon and the checkboxes */
}

.icon-container-2 .icon-label {
    display: block;  /* Ensures the label is treated as a block element, making it easier to position */
    color: black;  /* Sets the text color for visibility */
    text-align: center;  /* Centers the text within the label */
    width: 100%;  /* Makes the label span the full width of the container */
    margin-top: 5px;  /* Adds space between the image and the label */
    font-size: 12px; /* Ensure the font size is adequate */
}

.icon-container-2 input[type="checkbox"] {
    margin-right: 5px; /* Space between checkbox and label */
}

.icon-container.active {
    border: 2px solid #b937b8; // Use a bright color to indicate selection
background-color: #f4f4f4; // Light background color for active state
}

.icon-label {
    position: absolute;
    width: auto;  /* Allows the label to take only as much width as needed */
    white-space: nowrap;  /* Ensures the label stays on one line */
    bottom: 100%;  /* Position above the icon */
    left: 30%;  /* Center relative to the icon */
    transform: translateX(-50%);  /* Adjust horizontally to truly center */
    font-size: 10px;
    font-weight: bold;
    color: black;
    text-align: center;  /* Ensures text is centered if multiple lines are needed */
    padding-bottom: 7px;  /* padding between icons and labels */
    padding-top: 5px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 5px;  // Add margin for spacing from the icon
}

.circle {
    width: 15px;
    height: 15px;
    background-color: #ccc;
    border-radius: 50%;
    margin-top: 5px;
}

.circle + span {
    font-size: 8px;
    margin-left: 2px;
    white-space: nowrap;
}

.circle-radio:checked + .circle-visual {
    background-color: #8c318b;
}

.controls-container label {
    font-size: 10px; /* Example size, adjust as needed */
    cursor: pointer;
}

.flex-container {
    display: flex;
    width: 100%;  /* Ensure the container takes full width of its parent */
}

.controls {
    position: relative;
    flex: 1;  /* Smaller flex value means less space */
    width: 50%; /* Adjust as needed */
    display: flex;
    flex-direction: column; /* Arrange buttons and toggles vertically */
    align-items: flex-start; /* Align items to the left */
    margin-bottom: 20px; /* Add some space between the controls and the plot */
    flex-wrap: nowrap;
}

.controls .pheasant-demure-button, .controls .lb-main {
    flex: none;  /* Prevents flex items from growing or shrinking */
    margin-right: 10px;
}

.inline-control {
    display: flex;
    align-items: center;
    margin-right: 10px;
    white-space: nowrap; /* Prevents the text from wrapping */
}


/* Optional: Fine-tuning alignment */
.lb-main {
    transform: translateY(-2px); /* Adjust as needed */
}


.icon-row img {
    height: 50px;
}

.bottom-visual {
    flex: 4; /* Bottom container takes 45% of the screen height */
    display: flex;
    flex-direction: column; /* Changes layout to vertical */
    justify-content: flex-start; /* Aligns content to the top */
    align-items: center; /* Centers content horizontally */
    padding: 10px;
    width: 100%; /* Ensures it takes full container width */
}

.bottom-visual img {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 10px; /* Adds space between the text and the image */
}

.scaled-image {
    width: 100%;
    height: auto;
    display: block;
    margin-top: -20px;
}

.bottom-visual .bottom-content {
    display: flex;
    flex: 3;
    width: 100%; /* Ensures full container width usage */
    align-items: flex-start; /* Aligns the image to the top of the container */
    justify-content: left; /* Distributes space evenly around items */
    padding: 10px 0; /* Padding above and below the content */
}

.bottom-visual .text-content {
    flex: 1; /* Allows text content to fill the available space */
    padding-right: 10px; /* Adds some spacing between the text and the image */
    padding-left: 10px;
    max-width: 25%; /* Limits the text width */
    font-size: 12px;
}

.bottom-visual .flex-container {
    display: flex;
    flex-direction: row; /* Keeps the left pane and main content side by side */
    width: 100%; /* Full width to align children properly */
}

.bottom-visual img {
    max-width: 100%; /* Adjusts maximum width to allow space for text */
    height: auto; /* Keeps the image aspect ratio intact */
    display: block; /* Ensures the image is treated as a block-level element */
    margin-top: 10px; /* Adds space between the text and the image */
}

/* To override any other specific styles for images within .bottom-visual */
.bottom-visual .scaled-image {
    width: auto; /* Overrides the 100% width setting */
}

.icon-description {
    text-align: left; /* Center aligns the text */
    width: 100%; /* Ensures the description spans the full width of the container */
    background-color: #c9c9c9; /* Example background color for visibility */
    padding: 5px; /* Adds padding inside the text container for better spacing */
}

.header h1 {
    text-align: left;
    color: #e552bb;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    padding-top: 10px;
}

h2 {
    text-align: left;
    color: black;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

.tooltip {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 2px;
    opacity: 0;
    font-size: 6px; /* Adjust this value to change the font size */
    pointer-events: none;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -100%);
    z-index: 1050; /* Ensures tooltips float above other content */
}

.tooltip-inner {
    font-size: 8px !important;
    background-color: #fff !important;
    color: #333 !important;
}


.icon-container:hover .tooltip {
    opacity: 1; /* Show the tooltip when hovering over the icon */
}

.hover:hover {
    background-color: #ccc;
    color: #fff;
}

/* Styles for the range slider */
.slider-container {
    margin-top: 5px;
}

.slider-container .slider-axis, .slider-axis-title {
    font-size: 5px;
    font-weight: bold;
}

.slider-container .slider-handle, .slider-selection {
    fill: #646464;
}

.slider-container .slider-track {
    fill: #ccc;
}

.slider-container .slider-axis-label {
    font-size: 5px;
    fill: #333;
    transform: translateY(-10px);
}

/*///////// TOGGLE BAR///////////////
 */

.toggle-wrapper {
    margin-top: 2px;
    margin-bottom: 5px;
}

.toggleContainer {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: fit-content;
    border: 3px solid #343434;
    border-radius: 10px;
    background: #343434;
    font-weight: bold;
    font-size: 10px;
    color: #343434;
    cursor: pointer;
    padding: 8px 0;
    transform: scale(0.7);
    transform-origin: center;
}

.toggleContainer::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0;
    border-radius: 20px;
    background: white;
    transition: all 0.3s;
}

.toggleCheckbox:checked + .toggleContainer::before {
    left: 50%;
}

.toggleContainer div {
    padding: 6px;
    text-align: center;
    z-index: 1;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.toggleCheckbox {
    display: none;
}

.toggleCheckbox:checked + .toggleContainer div:first-child,
.toggleCheckbox:checked + .toggleContainer div:last-child {
    color: white;
    transition: color 0.3s;
}

.toggleCheckbox + .toggleContainer div:first-child,
.toggleCheckbox + .toggleContainer div:last-child {
    color: #343434;
    transition: color 0.3s;
}

/*POP UP */

#popupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* High z-index to ensure it's on top */
}

#popupBox {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
    width: 80%;
    max-width: 600px; /* Adjust size as needed */
    text-align: center;
}

#popupOverlay button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #b937b8;
    color: white;
}

/*Expanding Bar in Viz 1 */

.expandable-bar {
    height: 0;
    background-color: #f1f1f1; /* Light grey background */
    overflow: hidden;
    transition: height 0.3s ease;
}

.expanded {
    height: 200px; /* Adjust based on desired expanded height */
}

.icon-description .expand-arrow {
    cursor: pointer;
    float: right; /* Places the arrow at the right corner of the description bar */
}

/*TOPBAR*/

.header {
    display: flex;
    justify-content: space-between; /* Ensures the title and button container are on opposite ends */
    align-items: center; /* Vertically centers the content */
    padding: 10px; /* Adds more padding to the top */
    padding-top: 10px;
    background-color: #f4f4f4; /* Light grey background */
    width: 100%; /* Ensures the header spans the full width of the viewport */
}

.header-buttons {
    display: flex; /* Aligns buttons in a row */
    justify-content:flex-end; /* Aligns buttons to the far right */
    padding-right: 20px; /* Adds padding to the right side of the buttons */
    align-items: flex-start;
}

.header-buttons button {
    display: flex;
    align-items: center;  /* Ensures buttons are aligned with the title */
    margin-left: 10px; /* Adds space between buttons */
    background-color: #363636; /* Example: Blue background for buttons */
    color: white; /* Text color for buttons */
    border: none; /* Removes the default border */
    padding: 10px 15px; /* Padding inside the button */
    border-radius: 5px; /* Rounded corners for the button */
    cursor: pointer; /* Cursor changes to pointer when hovering over the button */
    font-size: 12px;
}

.header h1 {
    margin: 0; /* Removes default margin to avoid any unwanted space */
    padding-left: 10px; /* Adds left padding to the title */
    color: #b937b8; /* Dark grey color for the title text */
    flex-grow: 1; /* Allows the title to take up available space, adjust as needed */
    font-weight: 600;
}

input[type='radio']:checked + label {
    background-color: #983076;  // Example color when selected
}

.implementation-options input[type="radio"] {
    appearance: none;
    margin-right: 5px;
    vertical-align: middle;
}

.implementation-options label {
    display: inline-block;
    padding: 5px 8px; /* Decreased padding */
    margin: 3px; /* Decreased margin */
    background-color: #f4f4f4; /* Light grey background */
    border: 1px solid #ccc; /* Grey border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px; /* Decreased font size */
}


.implementation-options input[type="radio"]:checked + label {
    color: #b937b8;
}


/* Buttons */

/* Titles within controls */
.controls-title {
    font-size: 13px; /* Smaller font size for the titles */
    text-align: left; /* Left align the titles */
    margin-bottom: 1px; /* Space below the title */
    margin-top: 10px; /* Space below the title */
    color: #424242; /* Optional: match the button color or choose another */
    font-family: Arial, sans-serif; /* Consistent font with the buttons */
    font-weight: bold;
}

.pheasant-demure-button {
    padding: 6px 50px;
    margin-bottom: 5px;
    margin-top: 3px;
    font-size: 8px;
    font-family: Arial, sans-serif;
    color: white;
    background-color: #424242;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    text-overflow: ellipsis;
    /* Ensure sufficient width to display typical content without clipping */
    transition: background-color 0.3s, box-shadow 0.3s;
}

.pheasant-demure-button:hover {
    background-color: #2d2d2d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Different active state colors for each button */
.baseline.active, .baseline:active {
    background-color: #b937b8; /* Purple */
}

.scenario1.active, .scenario1:active {
    background-color: #00897b; /* Teal */
}

.scenario2.active, .scenario2:active {
    background-color: #dc5d5d; /* Red */
}

.scenario3.active, .scenario3:active {
    background-color: #d09435; /* Amber */
}


/* Common styles for any button when active */
.pheasant-demure-button.active {
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
    transform: translateY(2px);
}


/* Adjusting spacing for the toggle switch */
.toggle-wrapper {
    margin-top: 5px; /* Adds space above the toggle switch */
    margin-bottom: 10px; /* Adds space below the toggle switch */
}


/*Drop down */

.pheasant-demure-button, .dropdown {
    padding: 8px 25px;
    margin-bottom: 10px;
    font-size: 11px;
    font-family: Arial, sans-serif;
    color: white;
    background-color: #424242;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.dropdown {
    display: block;  // Ensures the dropdown fills the container width appropriately
width: 100%;     // Matches the button width for consistency
}

.pheasant-demure-button:hover, .dropdown:hover {
    background-color: #2d2d2d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* For focusing on dropdown specifically if needed */
.dropdown:focus {
    outline: none;  // Removes the default focus outline
border: 2px solid #888;  // Optional: adds a custom border on focus
}

@media (max-width: 768px) {
    .flex-container, .icon-and-graph, .left-pane {
        flex-direction: column; /* Stacks elements vertically */
        overflow: hidden;
    }

    .icon-and-graph {
        width: 100%; /* Adjusts to full width for responsiveness */
        max-height: 50%; /* Adjusts the height to split between the elements */
    }

    .visual1 {
        height: auto; /* Allows the visual1 to adjust height as needed */
    }

    .left-pane {
        padding: 5px; /* Reduce padding */
    }

    .left-pane .icon-label, .left-pane .tooltip, .controls-title {
        font-size: smaller; /* Reduce font size */
    }

    .left-pane button {
        padding: 8px 10px; /* Smaller buttons */
        font-size: 12px; /* Smaller font size for button text */
    }

    .toggle-wrapper, .toggleContainer {
        transform: scale(0.8); /* Scale down the toggle switch */
    }

    .controls {
        flex-direction: column;  /* Stacks items vertically on small screens */
    }

    .controls .pheasant-demure-button, .controls .lb-main {
        margin-right: 0;  /* Removes margin on small screens */
        margin-bottom: 10px;  /* Adds vertical spacing between items */
    }




}


.baseline-heading {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.baseline-heading.purple-text {
    color: #b937b8 !important;
}

.best-practice-heading {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.best-practice-heading.green-text {
    color: #23756b !important;
}

.scenario-recorder-heading {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.scenario-recorder-heading.orange-text {
    color: #dc5d5d;
}




/* light bulb */

.lb-main {
    padding: 1em 0 0 0;  /* Adjusted padding to align with smaller toggle size */
    text-align: center;
    margin-left: 10px; /* Space between the button and the toggle */
    vertical-align: middle;
}

.lb-l {
    background-color: rgba(0,0,0,0.7);
    border-radius: 0.5em; /* Smaller radius for a smaller toggle */
    box-shadow: 0.1em 0.1em 0 0.1em rgba(0,0,0,0.3) inset;
    color: #fdea7b;
    display: inline-flex;
    align-items: center;
    margin: auto;
    padding: 0.1em;  /* Reduced padding */
    width: 2.2em;  /* Smaller width */
    height: 1.1em;  /* Smaller height */
    transition: background-color 0.1s 0.3s ease-out, box-shadow 0.1s 0.3s ease-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.lb-l:before, .lb-l:after {
    content: "";
    display: block;
}

.lb-l:before {
    background-color: #d7d7d7;
    border-radius: 50%;  /* More rounded to fit the smaller size */
    width: 0.9em;  /* Smaller bulb */
    height: 0.9em;  /* Smaller bulb */
    transition: background-color 0.1s 0.3s ease-out, transform 0.3s ease-out;
    z-index: 1;
}

.lb-l:after {
    background:
            linear-gradient(transparent 50%, rgba(0,0,0,0.15) 0) 0 50% / 50% 100%,
            repeating-linear-gradient(90deg, #bbb 0, #bbb, #bbb 20%, #999 20%, #999 40%) 0 50% / 50% 100%,
            radial-gradient(circle at 50% 50%, #888 25%, transparent 26%);
    background-repeat: no-repeat;
    border: 0.2em solid transparent;
    border-left: 0.3em solid #d8d8d8;  /* Adjusted thickness */
    border-right: 0 solid transparent;
    transition: border-left-color 0.1s 0.3s ease-out, transform 0.3s ease-out;
    transform: translateX(-22.5%);
    transform-origin: 25% 50%;
    width: 0.9em;  /* Smaller decorative part */
    height: 0.8em;  /* Shorter decorative part */
}

.lb-l:checked {
    background-color: rgba(0,0,0,0.45);
    box-shadow: 0.1em 0.1em 0 0.1em rgba(0,0,0,0.1) inset;
}

.lb-l:checked:before {
    background-color: currentColor;
    transform: translateX(125%);
}

.lb-l:checked:after {
    border-left-color: currentColor;
    transform: translateX(-2.5%) rotateY(180deg);
}

.lb-l:focus {
    outline: 0;
}




/* Ensuring images and canvas within .icon-and-graph are scaled correctly */
.canvas-container, .scaled-image {
    max-width: 100%; /* Ensures no overflow */
    height: auto; /* Maintains aspect ratio */
}

/* Bootstrap specific adjustments */
@media (max-width: 768px) {
    .top-container, .visual1, .flex-container, .icon-and-graph {
        flex-direction: column; /* Stack vertically on small screens */
    }

    .left-pane, .icon-and-graph {
        width: 100%; /* Full width for smaller devices */
        max-height: unset; /* Removes any max-height restrictions */
    }

    .visual1, .visual2, .bottom-visual {
        flex: unset; /* Allow automatic resizing */
    }

    .controls, .toggle-wrapper, .pheasant-demure-button {
        width: 100%; /* Full width controls on small screens */
    }

    .icon-row {
        flex-wrap: wrap; /* Allow icons to wrap onto multiple lines */
    }

    .icon-container, .icon-container-2 {
        width: 100%; /* Full width icons for better layout on mobile */
        margin: 10px 0; /* Adjust margin for stacking */
    }
}


/* Tooltip container */
.tooltip {
    position: relative;
    display: inline-block;
}

/* Tooltip text */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;

    /* Position the tooltip text */
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -60px;

    /* Set the font size for tooltip text */
    font-size: 12px; /* Adjust the size as needed */
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip .tooltiptext {
    transition: visibility 0.2s, opacity 0.2s linear;
    opacity: 0;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}



