/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    position: relative;
}

body {
    font-family: 'Garet', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Layout */
#configurator-root {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#backButton{
    font-size: 1rem;
    padding: 10px;
}

.overlay {
    position: absolute;
    display: block;
    width: 100vw;
    height: 100vh;
    background-color: rgba(136, 136, 136, 0.33);
    z-index: 99999;
}
.spinner {
    width: 100px;
    height: 100px;
    border: 10px solid #f3f3f3;
    border-top: 10px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 39%;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.config-visual {
    flex: 2;
    background: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
}

#garageCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.config-panel {
    padding: 20px;
    max-width: 40%;
    overflow-y: scroll;
    position: relative;
}

.config-panel h2 {
    margin-bottom: 1rem;
}

.collapsible-section {
    border-radius: 5px;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease-in-out, visibility .3s ease-in-out; /* Add transition for visibility */
}
.hidden {
    opacity: 0 !important;
    visibility: hidden;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0;
}

.selectContainer{
    position: relative;
}
.smallOverlay{
    display: none;
    background-color: #33333347;
    position: absolute;
    width: 100%;
    height: 100%;
}
.small-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 8px;
    right: 30px;
}

.collapsible {
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    outline: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.collapsible::after {
    content: '▾';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.collapsible.active::after {
    transform: rotate(-180deg);
}

.collapsible:hover {
    background-color: #e6e6e6;
}

.step-info{
    font-style: italic;
    color: #333;
    font-weight: lighter;
}

.step-info.c{
    text-transform: capitalize;
}

.content {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition:
        max-height 0.4s ease,
        opacity 0.3s ease,
        padding 0.3s ease;
    padding: 0 1rem;
    background: #fafafa;
}

.two-by-two{
    display: grid;
    grid-template-columns: 6fr 6fr;
    gap: 10px;
}

.selected{
    box-sizing: border-box;
    border: 4px solid #ee780e !important;
}
.userSelected{
    box-sizing: border-box;
    border: 4px solid #ee780e !important;
}
.cus{
    border: 4px solid #b25503 !important;
    cursor: not-allowed;
}

.texture-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 4px solid transparent;
    box-sizing: border-box;

    transition: border-color 0.3s ease-in-out, border-radius 0.2s ease-out;
}

.texture-container:hover {
    border: 4px solid #3c3c3c;
    border-radius: 25px;
}

.texture-container img{
    width: 60%;
    height: 100px;

    border-radius: 50%;
}
.texture-container img.angle{
    border-radius: 0 !important;
}

.info-btn{
    position: absolute;
    font-size: 2rem;

    top: 10px;
    right: 10px;

    transition: color .4s ease-in-out;
}
.info-btn:hover{
    color: #b25503;
}

.content.open {
    opacity: 1;
    padding: 1rem;
    height: 100%;
    border-top: 1px solid #ddd;
}


/* Inputs inside content */
.content label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.content input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.config-panel label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.config-panel input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Modal Background */
.modal {
    display: none;  /* Hidden by default */
    position: fixed;
    z-index: 9999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
    overflow: auto; /* Enable scrolling if needed */
    padding-top: 60px;
}

/* Modal Content Box */
.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    padding-top: 40px;
    border: 1px solid #888;
    width: 80%; /* Adjust based on need */
    max-width: 500px; /* Max width for large screens */
    text-align: center;
}

/* Close button */
.close-btn {
    color: #aaa;
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Image Styling */
.modal-image {
    width: 100%; /* Image should fit inside the modal */
    max-height: 300px; /* You can adjust this height */
    object-fit: cover; /* Keeps aspect ratio */
}
.modal-icon {
    font-size: 3rem;
}

/* Description Styling */
.modal-description {
    font-size: 2rem;
    margin-top: 15px;
    color: #333;
}

#saveUserChoices{
    position: absolute;
    top: 0;
    right: 0;
    z-index: 99;
}

.haveConfigContainer{
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}
.haveConfigContainer button{
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    align-items: center;
}
.haveConfigContainer .continue{
    background-color: #2ecc71;
}
.haveConfigContainer .continue:hover{
    background-color: rgb(28, 122, 67);
}
.haveConfigContainer i{
    font-size: 1.3rem;
}

/* Price Section */
.price-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    position: relative;
}

/* Price text */
.price {
    font-size: 20px;
    font-weight: bold;
    color: #2ecc71;
    margin-right: 10px;
}

/* Discount text */
.discount {
    background-color: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    position: absolute;
    top: -10px;
    right: -10px;
    transform: rotate(45deg);
}
.fade{
    font-weight: lighter;
    margin-right: 5px;
    font-style: italic;
}
.row{
    display: flex;
    flex-direction: row;
}

.step-container{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px;
}
.step{
    padding: 10px 15px;
    border-radius: 50%;
    background-color: #ccc;

    cursor: pointer;

    border: 3px solid transparent;

    transition: all .3s ease-in-out;
}
.step:hover{
    box-sizing: border-box;
    border: 3px solid rgb(0, 99, 134);
    scale: 1.2;
}
.step.optional{
    background-color: #ffffff;
    color: black;
}
.step.warning{
    background-color: #ffca2b;
    color: black;
}
.collapsible.done{
    background-color: #bdff9e;
}
.collapsible.optional{
    background-color: #ffffff;
}
.step.error{
    background-color: #f69e90;
    color: black;
}
.step.active{
    background-color: #edffae;
    color: rgb(0, 0, 0);
}
.step.done{
    background-color: #bdff9e;
    color: black;
}
.step.egyharmad{
    background: conic-gradient(
        #a4ff79 0deg 120deg,
        white 120deg 360deg
    );
}
.step.fel{
    background: conic-gradient(
        white 0deg 180deg
        #a4ff79 180deg 360deg,
    );
}
.step-line{
    height: 2px;
    width: 15px;
    background-color: black;
}

select {
    width: 200px;
    padding: 8px;
    font-size: 14px;
}

/* General form styles */
#contactForm {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;

    padding-top: 18px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#contactForm h2 {
    font-size: 1.2rem;
}

.back-button{
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.two-in-row{
    display: flex !important;
    gap: 10px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-group select {
    padding: 8px;
}

.button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.button:hover {
    background-color: #2980b9;
}

.button.disabled{
    background-color: #33333365;
    cursor: not-allowed;
}

.button.disabled:hover{
    background-color: #33333365;
}

.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.whole-row{
    grid-column: span 2;
}

.alcim{
    font-size: 1.3rem;
    font-weight: bolder;
}

.checkbox-label {
    display: flex !important;
    align-items: center; /* Center the checkbox vertically with the text */
    gap: 5px;
    font-size: 14px;
    color: #333;
}

.checkbox-label input {
    width: 40px;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Show spinner when loading */
.loading {
    position: relative;
}

.loading.active {
    pointer-events: none;
}

.loading.active + #small-spinner {
    display: block;
}



.infoContainer {
    position: absolute;
    left: -100%;
    max-width: 800px;
    background-color: #fff;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: left .5s;
}
.hide-btn{
    position: absolute;
    background-color: #e9e9e9;
    left: 0;
    font-size: 2rem;
    border-radius: 0 8px 8px 0;
    transition: all .5s;
    z-index: 50;
    overflow: hidden;
    width: 10px;
}
.hide-btn:hover{
    background-color: #b6b6b6;
    width: 60px;
}

.infoContainer tbody tr td:nth-child(odd) {
    padding-right: 20px;
    font-weight: 500;
}
.infoContainer tbody tr:nth-child(odd) {
    background-color: #e9e9e9;
}
.infoContainer table{
    margin: 20px auto;
}
.infoContainer table thead td{
    padding-bottom: 10px;
}
.infoContainer table tbody td{
    padding-top: 5px;
    font-size: .6rem;
}
.infoContainer table thead{
    font-size: .8rem;
    font-weight: bolder;
}
.infoContainer table tbody td{
    margin-bottom: 5px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 800px) {
    body{
        max-height: 85vh;
    }

    html, body{
        overflow: hidden; /* Prevent the body itself from scrolling */
        overscroll-behavior: none;
    }

    .step{
        font-size: .6rem;
        padding: 10px;
   }
   .step-line{
        width: 5px;
    }
    .step-container{
        margin: 5px 0;
    }
    .texture-container img{
        width: 40%;
        height: 80px;
    }
    .info-btn{
        font-size: 1.5rem !important;

        top: 10px;
        right: 10px;
    }
    .simple-icon{
        font-size: 3rem !important;
    }
    .texture-container label{
        font-size: .7rem;
    }

    .content label{
        font-size: .8rem;
    }

    .color-option, .selected-color{
        height: 60px !important;
    }   

    h2{
        font-size: 1.2rem;
    }

    .texture-container img{
        height: 60px !important;
    }

    #contactForm{
        padding-top: 10px;
    }
    .button {
        font-size: .8rem;
        padding: 5px;
    }
    #submitBtn, #nextButton{
        font-size: 1.2rem;
    }

    #configurator-root {
        flex-direction: column;
        height: 100%;
        width: 100%;
    }

    #backButton{
        font-size: .6rem;
    }

    .config-visual{
        height: 40vh;
    }

    #garageCanvas{
        height: 40vh;
    }

    .config-panel {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding: 1rem;
        max-width: 100%;
    }
}