* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-size: 1.25rem;
    line-height: 1.8;
}

.container {
    display: flex;
    height: 100vh;
}

/* Left Image Section */
.image-container {
    flex: 0.618;
    /* Golden ratio proportion */
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    font-size: 2em;
    text-align: center;
}

/* Right Content Section */
.content {
    flex: 1;
    /* Golden ratio proportion */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    background-color: #fff;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #f24405;
}

/* Main Text Section */
.main-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
    align-items: center;
    /* Center horizontally if needed */
    text-align: justify;
    padding: 20px;
}

.main-text p {
    margin-bottom: 20px;
}

.legend {
    width: 60%;
    /* Adjust width as needed */
    margin: 0 auto 5rem;
    /* Center the container horizontally */
    text-align: left;
    /* Ensure the container itself does not center text */
}

.legend ul {
    padding-left: 30px;
    /* Remove default padding */
    margin-left: 0;
    /* Align list with text */
}

.legend li {
    text-align: left;
    /* Ensure the list items are left-aligned */
    margin-bottom: 10px;
    /* Add spacing between items */
    margin-top: 10px;
    /* Add spacing between items */
}

/* Footer Section */
.footer {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container img {
    height: 50px;
}

.h1-button {
    font-weight: bold;
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-size: 1.25rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #000;
}

.h1-button:hover {
    color: #f24405;
}

.button-container {
    display: flex;
    justify-content: center;
    /* Centers the button horizontally */
    margin-top: 1rem;
    /* Adds spacing above the button */
}

.submit-order-button-container {
    display: flex;
    flex-direction: column;   /* stack buttons */
    width: 250px;             /* one width for all buttons */
    margin: 0 auto;           /* center this box in its parent */
}

.submit-order-button-container .button {
    width: 100%;              /* each button spans the 250 px box */
}

.profile-list {
    list-style-type: none;
}

/* Table Styling */
/* Table Styling */
table#projects,
table#orders,
table#requests { /* Corrected from table#request */
    width: 100%;
    border-collapse: collapse;
    /* Ensures borders do not double up */
    margin-top: 20px;
}

table#projects th,
table#projects td,
table#orders th,
table#orders td,
table#requests th, /* Corrected from table#request th */
table#requests td { /* Corrected from table#request td */
    border-bottom: 1px solid #ddd;
    /* Thin line between rows */
    padding: 10px 15px;
    /* Adds padding inside each cell */
    text-align: left;
    /* Align text to the left */
}

table#projects th,
table#orders th,
table#requests th { /* Corrected from table#request th */
    border-top: 1px solid #ddd;
    /* Thin line above header row */
    background-color: #f2f2f2;
    /* Optional: Background color for the header */
    font-weight: bold;
}

table#projects tr:last-child td,
table#orders tr:last-child td,
table#requests tr:last-child td { /* Corrected from table#request tr:last-child td */
    border-bottom: none;
    /* Remove bottom border from the last row */
}

/* ----- BUTTONS inside .main-text ----- */
/* Style only buttons inside .main-text */
/* ----- General button styling inside .main-text ----- */
.main-text .button,
.list-button .button {
    /* Apply the same styles to both */
    font-family: inherit;
    font-size: inherit;
    padding: 12px 24px;
    /* Ensure consistent padding */
    margin-bottom: 10px;
    /* Equal spacing between buttons */
    display: inline-block;
    text-align: center;
    background-color: #90a199;
    /* Default background */
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    line-height: 1.2;
    /* Ensure line height is the same */
    font-weight: bold;
    /* Ensure consistent text weight */
    text-decoration: none;
}

/* ----- Hover effect ----- */
.main-text .button:hover,
.list-button .button:hover {
    background-color: var(--animation-color);
    color: black;
}

/* ----- Specific styling for Profile button ----- */
.main-text .button.special-button {
    margin-top: 30px;
}

/* ----- Specific styling for Delete Project button ----- */
.list-button .button {
    background-color: #f24405 !important;
}

/* Fix: Ensure it matches other buttons in size */
.list-button .button:hover {
    background-color: white !important;
    color: #f24405 !important;
}

/* ----- Specific styling for Add Project button ----- */
.list-button-green .button {
    background-color: #90a199 !important;
    margin-top: 20px;
    /* Adjust as needed */
}

/* Fix: Ensure it matches other buttons in size */
.list-button-green .button:hover {
    background-color: white !important;
    color: #90a199 !important;
}

.main-text ul.list-button {
    list-style: none;
}

.scrollable-form {
    max-height: 600px;
    /* or any desired height */
    overflow-y: auto;
    /* show vertical scroll if content exceeds max-height */
    margin-bottom: 1em;
    padding-right: 1em;
    /* optional, to avoid scrollbar overlapping text */
}

/* Mapbox & 3D Container */

/* Container for the Map and 3D Viewer */
.map-3dViewer {
    flex: 0.618;
    /* Golden ratio proportion */
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Full viewport height; adjust as needed */
}

.map-section {
    height: 30%;
    /* Use 30% of .map-3dViewer’s height */
    min-height: 500px;
    /* Optional: ensure it never gets too small */
    position: relative;
    /* If you need absolute children inside */
}

#map {
    width: 100%;
    height: 100%;
}

.preview-text {
    /* This is your “3D Preview” heading and paragraph.
       It will take up some space above the viewer. */
    padding: 1rem;
    background-color: #f6f6f4;
}

/* Make the preview-section fill the leftover vertical space */
.preview-section {
    /* Flex: 1 uses all remaining space */
    flex: 1;
    display: flex;
    /* So child can stretch */
    flex-direction: column;
    position: relative;
    /* If you need absolute positioning inside */
    background-color: #f6f6f4;
}

/* Style projects list */
.project-row:hover {
    background-color: #f2f2f2;
    /* Adjust the color as needed */
}

.ifcviewer {
    flex: 1;
    /* Fill remaining space in .preview-section */
    position: relative;
    /* If needed */
}

/* Finally, ensure the <canvas> inside #ifcviewer fits */
#ifcviewer {
    width: 100%;
    height: 100%;
    display: block;
}

#ifcviewer canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.duplicates-count {
    margin-top: 1em;
    padding: 0.5em 0;
    text-align: center;
    font-weight: bold;
}

/* Style project details table*/
.details-table th {
    padding-left: 0;
    padding-right: 16px;
}

.details-table td {
    padding-left: 0;
    padding-right: 16px;
}


/* Styles for the assistant query section */
#ai-assistant {
    margin-bottom: 1em;
}

#assistantForm {
    display: flex;
    align-items: center;  /* Vertically centers elements in the flex container */
    font-family: inherit; /* Inherit font from the page */
}

#assistantForm input[type="text"] {
    width:700px;
    /* Match the button’s padding */
    padding: 12px 24px;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.2;
    box-sizing: border-box; /* Ensures the width includes padding */
    margin-right: 1em;
}

#assistantForm button.button {
    margin-bottom: 0; /* Override the existing margin-bottom for alignment */
}

/* Styles for the assistant query section */
#ai-assistant {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0 1em; /* Add some padding so content doesn't touch edges */
    box-sizing: border-box; /* Include padding in width calculation */
}

#assistantForm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit; 
    width: 100%;
}

#assistantForm input[type="text"] {
    flex-grow: 1;
    min-width: 200px;
    max-width: 700px; 
    padding: 12px 24px; /* Match button padding */
    font-family: inherit;
    font-size: inherit;
    line-height: 1.2;
    box-sizing: border-box; /* Include padding in width */
    margin-right: 1em; /* Space between input and button */
}

#assistantForm button.button {
    margin-bottom: 0; /* Override default margin for alignment */
    /* Prevent button from shrinking if space is tight */
    flex-shrink: 0;
}

#assistantResponse {
    margin-top: 1em;
    font-weight: bold;
    /* Text alignment is inherited from #ai-assistant (center) */
    /* Ensure long text wraps properly */
    word-wrap: break-word; /* Older browsers */
    overflow-wrap: break-word; /* Standard */
    /* Keep text centered even when it wraps */
    text-align: center;
}

/* Styles for the textarea in the cart for messaging suppliers */
.cart-message-textarea {
    width: 100%;
    max-width: 700px;
    min-width: 500px;     /* From your #assistantForm input style */
    padding: 12px 24px;   /* From your #assistantForm input style */
    font-family: inherit; /* From your #assistantForm input style */
    font-size: inherit;   /* From your #assistantForm input style */
    line-height: 1.2;     /* From your #assistantForm input style */
    box-sizing: border-box; /* From your #assistantForm input style */
    margin-top: 6px;      /* Kept from original inline style */
    /* The 'rows' attribute is set in JavaScript (ta.rows = 3) 
        Alternatively, you could set a height here, e.g., height: calc(3 * 1.2em + 2 * 12px); 
        but 'rows' is more idiomatic for textareas. */
}

/* Style for the placeholder text within the cart message textarea */
.cart-message-textarea::placeholder {
  text-align: left;
}

.button.button-no-top-margin { /* More specific selector to ensure override */
  margin-top: 0 !important; /* Override any existing margin-top from .button or other general rules */
}

/* ------------- Custom Checkbox Styling for Services  ------------- */

/* Styling for the "Additional services required" heading */
.services-heading {
  text-align: center; /* Or left, as preferred by your design */
  font-size: 1.2em;   /* Adjust font size */
  margin-bottom: 1em; /* Space below the heading */
  color: #333;       /* Heading text color */
}

/* The container (label) - adapted from user's .container */
.custom-checkbox-label { /* Matches JS output */
  display: block;
  position: relative;
  padding-left: 35px; /* User's value */
  margin-bottom: 12px; /* User's value */
  cursor: pointer;
   line-height: 25px; /* To align with checkbox-visual height */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default checkbox - adapted from user's .container input */
.custom-checkbox-label input.hidden-checkbox { /* Matches JS output */
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox (visual box) - adapted from user's .checkmark */
.checkbox-visual { /* Matches JS output */
  position: absolute;
  top: 0;
  left: 0;
  height: 25px; /* User's value */
  width: 25px;  /* User's value */
  background-color: #eee; /* User's value */
  border-radius: 4px; /* Added for slightly softer edges, optional */
  transition: background-color 0.2s ease; /* Smooth transition for hover */
}

/* On mouse-over, add a grey background color - adapted from user's .container:hover input ~ .checkmark */
.custom-checkbox-label:hover input.hidden-checkbox ~ .checkbox-visual {
  background-color: #ccc; /* User's value */
}

/* When the checkbox is checked, add the desired background - adapted from user's .container input:checked ~ .checkmark */
.custom-checkbox-label input.hidden-checkbox:checked ~ .checkbox-visual {
  background-color: #90a199; /* User's value (light grey-green) */
}

/* Create the checkmark/indicator (hidden when not checked) - adapted from user's .checkmark:after */
.checkbox-visual:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked - adapted from user's .container input:checked ~ .checkmark:after */
.custom-checkbox-label input.hidden-checkbox:checked ~ .checkbox-visual:after {
  display: block;
}

/* Style the checkmark/indicator - adapted from user's .container .checkmark:after */
.custom-checkbox-label .checkbox-visual:after {
  left: 9px;    /* User's value */
  top: 5px;     /* User's value */
  width: 5px;   /* User's value */
  height: 10px; /* User's value */
  border: solid white; /* User's value */
  border-width: 0 3px 3px 0; /* User's value */
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}