@import "floating-ui.css";
@import "colorPicker.css";
@import "loaderCircle.css";
@import "imagePreview.css";

:root {
    --primary-color: rgb(148,207,150);
}

#course-choice-overlay {
    position: fixed;
    inset: 0;
    background: rgba(229, 245, 229, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.course-choice-card {
    background: #fff;
    border: 1px solid #b8deba;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: system-ui, sans-serif;
}

.course-choice-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #1e3320;
}

.course-choice-card p {
    color: #4a6b4e;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.course-choice-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-choice-new,
.btn-choice-continue {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #b8deba;
}

.btn-choice-new {
    background: #fff;
    color: #4a6b4e;
}

.btn-choice-new:hover { background: rgb(229, 245, 229); }

.btn-choice-continue {
    background: rgb(148, 207, 150);
    color: #1e3320;
}

.btn-choice-continue:hover { background: rgb(120, 190, 122); }

body {
    /* background-color: black; */
    background-color: rgb(229, 245, 229);
}

canvas {
    background-color: white;
}

.container {
    display: grid;
    /* grid-template-columns: 100px 1fr; */
    grid-template-columns: max-content max-content;
    gap: 20px;
    /* height: 100vh; */
    justify-content: center;
}

.ui-container {
    display: flex;
    flex-flow:column;
    height:100%;
    background-color: white;
    justify-content: space-between;
    padding: 5px;
    /* todo will have to be changed for smaller screens */
    width: 104px;
}

.obstacles {
    display: grid;
    /* grid-template-columns: 1fr 1fr 1fr; */
    grid-template-columns: 1fr 1fr;
}

.obstacle {
    /* margin-top: 10px; */
}

input + label > .obstacle-image {
    /* border: 2px solid rgb(148,207,150, 0); */
}

input:checked + label > .obstacle-image {
    /* border: 2px solid rgb(148,207,150); */
    /* box-shadow: 0px 0px 5px rgb(148,207,150); */
    box-shadow: 0px 0px 5px rgb(148,207,150), 0px 0px 10px rgb(148,207,150)
}

.obstacle > input, .other-ui-element > input {
    display: none;
}

input:checked + label {
    font-weight: bold;
  }

.obstacle-image {
    height: 48px;
    width: 48px;
    object-fit: fill;
    border-radius: 5px;
    box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
}

.ui-group-element  {
    height: 48px;
}


.side-panel {
    display: none;
}

#settings-modal {
    background-color: white;
    width: min(750px, 90%);
    height: min(350px, 60%);
}

#settings-modal .modal-content {
    height: 85%;
}

.modal-inner {
    width: 100%;
    height:100%;
}

.modal-content {
    width: 100%;
    /* height: 80%; */
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.modal-slider {
    display: grid;
    grid-template-columns: 80% 10%;
    justify-content: space-around;
}

.modal-setting-slider-header {
    margin: 0 auto 0 auto;
}

input[type='range'] { 
    accent-color: rgb(148,207,150);
}

input[type='checkbox'] {
    accent-color: rgb(110, 169, 112);
}


.slide-checkbox > input {
    display: none;
}

.slide-checkbox {
    user-select: none;
}

.slider {
    position: relative;
    display: inline-block;
    /* text-align: center; */
    padding-left:2px;
    padding-right: 2px;
    width: 55px;
    height: 30px;
    background-color: rgb(228, 13, 31);
    border-radius: 15px;
    transition: transform 0.3s ease-in-out;
    /* border: 1px solid gray; */
    box-shadow:inset 0px 0px 0px 1px lightgray;
    display: grid;
    grid-template-columns: auto auto;
}

.slider-inner {
    display: inline-block;
    margin: auto;
}

.slider-slider {
    position: absolute;;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.1s ease-in-out;
    top: 5px;
    left: 5px;
}

.slider-label {
    font-weight: initial !important;
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 20px;
}

input:checked ~ label > .slider > .slider-slider {
    transform: translateX(150%);
}

input:checked ~ label > .slider {
    background-color: rgb(148,207,150);
}

.forward-backward {
    display: flex;
    justify-content: flex-start;
    /* align-items: center; */
    /* gap: 10px; */
}

/* .multiple-icon-group {
    grid-column: span 3;
} */

img {
    /* border: 2px solid rgb(148,207,150, 0) */
}

.icon {
    margin-top: 10px;
    margin-right: 2px;
    margin-left: 2px;
    background-color: white;
    max-width: max-content;
}

.icon:has(> input:checked) {
    z-index: 9999;
}

.other-ui-elements {
    display: grid;
    grid-template-columns: auto;
}

/* .multiple-icon-group {
    display: grid;
    grid-template-columns: auto auto;
} */

.export-icon {
    height: 64px;
}

.export-icons-export {
    display: flex;
    justify-content: space-evenly;
}

.export-icons-export > div {
    padding: 20px;
}

#url-wrapper > div {
    margin: auto;
    width: max-content;
}

#url-wrapper {
    margin: auto;
    margin-top:20px;
}

.export-url-wrapper {
    display: flex;
    flex-flow: column;
}

#export-url {
    display: flex;
    border-top: none;
}

#export-url > img {
    margin: auto;
}

#url {
    height: 20px;
    border-radius: 5px;
    border: 2px solid #85c988;
}

.button {
    color: white;
    background-color: #85c988;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
}

/* .export-icon-wrapper.big-icon, {
    border: 1px solid gray;
} */

.export-icon-wrapper {
    /* border: 1px solid #85c988; */
}

.export-icon-wrapper:hover {
    background-color: #7ce08038;
}

.error-image-wrapper > img {
    width:20px;
    aspect-ratio: 1 / 1;
}

.formal-checker.modal-content {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
    height: initial;
    justify-content: center;
}

/* .warning > img {
    filter: hue-rotate(60deg);
} */


#formal-checker-modal {
    /* width: min(750px, 90%);
    height: min(350px, 60%); */
    background-color: white;
    padding: 30px;
}

.text-number {
    width: 17px;
    height: 17px;
    border: 1px solid black;
    border-radius: 50%;
    text-align: center;
    display: inline-block;
    font-size: 15px;
}

.problem {
    line-height: 18px;
}

.error:has(+ .problem + .warning) {
    padding-bottom: 20px;
}

.course-settings-wrapper {
    display: flex;
    justify-content: space-evenly;
    margin-top:20px;
}

input[type="text"].courseSettings {
    border-radius: 5px;
    border: 2px solid rgb(148,207,150);
}

/* input[type="text"].courseSettings:focus-visible {
    outline: 2px solid rgb(187, 187, 187);
} */

@media print {
    /* All your print styles go here */
    .ui-container, .obstaclesList  {
        display: none !important;
    }

    .container {
        display: block !important;
        height: unset !important;
    }

    canvas {
        display: block !important;
    }

    body, html {
        margin: 0 !important;
        padding: 0 !important;
    }

    @page {
        size: a4 landscape;
        /* page-orientation: rotate-right; */
        margin: 5mm 1mm 5mm 1mm; /* change the margins as you want them to be. */
    }

}




.multiple-icon-group {
    display: flex;
    overflow: visible;
    z-index: 999;
    height: max-content;
    /* background-color:white; */
    position: relative;
    max-width: 50px;
    max-height: 48px;
}

.multiple-icon-group:hover {
    max-width: unset;
    max-height: unset;
}

.multiple-icon-group:has(> div > input:checked) {
    z-index: 9999;
}

.multiple-icon-group .icon {
    /* display: none; */
    opacity: 0;
}

.multiple-icon-group .icon:has(> input:checked ~ label) {
    /* display:block; */
    opacity: 1;
}

.multiple-icon-group:not(:has( > .icon > input:checked)) > .icon:nth-child(1) {
    /* display: block; */
    opacity: 1;
}

.multiple-icon-group:hover > .icon {
    /* display: block !important; */
    opacity: 1 !important;
}

.separator {
    width: 15px;
    height: 15px;
}

.multiple-icon-group .ui-group-element-0 {
}

.multiple-icon-group .ui-group-element-1 {
    /* margin-left:5px; */
    /* padding-left:5px; */
    left: -52px;
}

.multiple-icon-group .ui-group-element-2 {
    /* margin-left:5px; */
    /* padding-left:5px; */
    left: -104px;
}

.multiple-icon-group .ui-group-element-3 {
    /* margin-left:5px; */
    /* padding-left:5px; */
    left: -156px;
}

.multiple-icon-group .ui-group-element-4 {
    /* margin-left:5px; */
    /* padding-left:5px; */
    left: -204px;
}

.multiple-icon-group .ui-group-element-5 {
    /* margin-left:5px; */
    /* padding-left:5px; */
    left: -254px;
}

.multiple-icon-group > .icon {
    border-bottom: 0px solid var(--primary-color);
}

.multiple-icon-group:hover > .icon {
    border-bottom: 1px solid var(--primary-color);
}

.ui-group-element {
    transition: all 0.2s ease-in-out;
}

.multiple-icon-group:hover .ui-group-element {
    left: 0px;
    top: 0px;
}

.ui-group-element-0, .ui-group-element-1, .ui-group-element-2, .ui-group-element-3, .ui-group-element-4, .ui-group-element-5 {
    position: relative;
}

.ui-group-element-0 {
    z-index: 10;
}

.ui-group-element-1 {
    z-index: 9;
}

.ui-group-element-2 {
    z-index: 8;
}

.ui-group-element-3 {
    z-index: 7;
}

.ui-group-element-4 {
    z-index: 6;
}

.ui-group-element-5 {
    z-index: 5;
}


@media (width < 1660px) {
    /* TODO */
    .container {
         grid-template-columns: max-content;
         /* display:flex; */
    }

    .obstacles {
        display: flex;
        justify-content: center;
    }

    .obstacle {
        height: fit-content;
    }

    .ui-container {
        display: flex;
        width: 100%;
    }

    .main-ui {
        display: flex;
        justify-content: center;
    }

    .multiple-icon-group {
        display: unset;
        overflow: visible;
        z-index: 999;
        max-height:48px;
        background-color:white;
    }

    .multiple-icon-group:hover {
        height: unset;
        max-width: unset;
        max-height: unset;
    }

    .multiple-icon-group:has(> div > input:checked) {
        z-index: 9999;
    }

    .multiple-icon-group .icon {
        opacity: 0;
    }

    .multiple-icon-group .icon:has(> input:checked ~ label) {
        opacity: 1;
    }

    .multiple-icon-group:not(:has( > .obstacle > input:checked)) > .obstacle:nth-child(1) {
        opacity: 1;
    }

    .multiple-icon-group:hover > .obstacle {
        opacity: 1 !important;
    }

    .multiple-icon-group .ui-group-element-1 {
        /* margin-left:5px; */
        /* padding-left:5px; */
        top: -52px;
        left: 0px;
    }

    .multiple-icon-group .ui-group-element-2 {
        /* margin-left:5px; */
        /* padding-left:5px; */
        top: -104px;
        left: 0px;
    }

    .multiple-icon-group .ui-group-element-3 {
        /* margin-left:5px; */
        /* padding-left:5px; */
        top: -162px;
        left: 0px;
    }

    .multiple-icon-group .ui-group-element-4 {
        /* margin-left:5px; */
        /* padding-left:5px; */
        top: -204px;
        left: 0px;
    }

    .multiple-icon-group .ui-group-element-5 {
        /* margin-left:5px; */
        /* padding-left:5px; */
        top: -254px;
        left: 0px;
    }

    
    .multiple-icon-group > .icon {
        border-bottom: 0px solid var(--primary-color) !important;
        border-right: 1px solid white !important;
    }

    .multiple-icon-group:hover > .icon {
        border-bottom: 0px solid var(--primary-color) !important;
        border-right: 1px solid var(--primary-color) !important;
    }

    .other-ui-elements {
        display: flex;
    }

    .ui-container {
        height: 58px;

        display: grid;
        justify-content: center;
        grid-template-columns: max-content max-content;
    }

    .container {
        gap: 1px;
    }

    body {
        margin: 0;
    }

    .icon {
        margin-top: 5px;
        margin-right: 0px;
        margin-left:0px;
    }

    .obstacle-image {
        box-shadow: unset;
    }

    .other-ui-elements {
        justify-content: space-evenly;
    }

    .separator {
        width: 1px !important;
        height: 58px !important;
        background-color: rgb(148,207,150);
        /* margin: auto;
        margin-top: auto;
        margin-bottom: auto; */
        margin-left: 0;
        margin-right: 0;
        padding: 0px;
        box-shadow: 0 0 2px 0px rgb(148,207,150);
    }

    dialog {
        margin-top: 100px;
    }
}

@media (hover: none) {
    .side-panel {
        display: block;
        position: fixed;
        width: 30px;
        height: 100px;
        background-color: white;
        color: black;
        z-index: 1000;
        top: calc(50% - 50px);
        right: 0;
        border: 1px solid green;
    }
}

input+label > .obstacle-image.lock {
    display: none;
    box-shadow: none;
}

input:checked+label > .obstacle-image.lock {
    display: inline;
    box-shadow: none;
}

.obstacle-image:has(+ .lock) {
    box-shadow: none !important;
}

.lock {
    top: -16px;
    width:12px;
    height:16px;
    position:absolute;
    left:0px;
}

.lockable-image {
    width:32px;
    height:32px;
    position:relative;
}