/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    margin: 0;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Header Styling */
header {
    background-color: #aecbeb;
    border-radius: 5px;
    font-size: 30px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header img {
    height: 30px;
    margin-left: auto;
}

/* Main Layout */
main {
    flex: 1;
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "input-content"
        "canvas-content"
        "properties-info";
    margin-bottom: 20px;
}

/* Responsive grid for larger screens */
@media (min-width: 1024px) {
    main {
        grid-template-columns: 1.1fr 3fr 1fr;
        grid-template-areas: "input-content canvas-content properties-info";
    }
}

/* Input content section */
.input-content {
    grid-area: input-content;
    width: 100%;
    background-color: #aecbeb;
    border-radius: 20px;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.input-content nav {
    margin: 10px;
}

.input-field {
    margin: auto;
    margin-top: 10px;
    background-color: #ccddef;
    width: 95%;
    border-radius: 5px;
    /* padding: 10px; */
}

/* @media (min-width: 1024px) { */
    /* .input-field { */
        /* height: 70%; */
    /* } */
/* } */

#inputField {
    margin-top: 10px;
}

#inputField fieldset {
    padding: 10px;
}


/* Form inputs */
input {
    width: 100%;
    max-width: 150px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.geometry-inputs,
.material-inputs {
    display: grid;
    grid-template-columns: 1fr;
    /* gap: 10px; */
}

@media (min-width: 768px) {
    .geometry-inputs,
    .material-inputs {
        grid-template-columns: 70% 25%;
    }
}

/* Button Styling */
button {
    padding: 10px;
    background-color: #007bff; /* Blue color */
    color: #fff; /* White text */
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
    /* width: 100%; */
    /* max-width: 200px; */
    margin: 5px 0;
    /* min-height: 44px; */
}

button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}


/* Canvas content section */
.canvas-content {
    grid-area: canvas-content;
}

canvas {
    width: 100%;
    height: auto;
    min-height: 250px;
    max-height: 300px;
    touch-action: none;
}

.canvas-container {
    padding: 15px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

.canvas-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .canvas-controls {
        flex-direction: row;
        justify-content: space-between;
    }
}


/* Properties Section */
.properties-info {
    grid-area: properties-info;
    background-color: #aecbeb;
    border-radius: 20px;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* height: 100%; */
}

.properties-info h3 {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.properties-info table {
    width: 95%;
    margin: 0 auto;
    background-color: #ccddef;
    border-radius: 5px;
}

.properties-info td {
    padding: 8px;
}

.properties-info td:first-child {
    text-align: left;
}

.properties-info td:last-child {
    text-align: right;
}

.properties-info .button-container {
    width: 95%;
    margin: 0 auto;
    margin-top: auto;
    margin-bottom: 10px;
}


/* Additional Elements */

/* Added Materials section */
#addedMaterials {
    margin-left: 10px;
    margin-top: auto;
    margin-bottom: 10px;
}

/* Material editing forms */
#editMaterialForm {
    background-color: #ccddef;
    padding: 10px;
    border-radius: 5px;
}

#editNameForm input {
    width: 80px;
}

#editMaterialForm button {
    margin-top: 10px;
}


/* Container visibility states */
#geometryContainer {
    display: block;
}

#resultContainer {
    display: none;
}

/* Option hover states */
option:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Footer Styling */
footer {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 20px;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    max-width: 100%;
    padding: 0 15px;
}

.footer-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 5px;
}

/* Footer background image for larger screens */
@media (min-width: 768px) {
    footer {
        background-image: url('secan-logo.png');
        background-repeat: no-repeat;
        background-position: right center;
        background-size: 12%;
    }
}