
/* UI Reference: https://pixinvent.com/demo/vuexy-vuejs-admin-dashboard-template/demo-6/dashboard/ecommerce */

/* ------------------------ */
/* Custom properties        */
/* ------------------------ */

:root { /* Means that the variable is under the document’s root (i.e. global) */
    /* Colors */
    --clr-dark: #161d31;
    --clr-light: 231 77% 90%;
    --clr-text: #b4b7bd;
    --left-msg-bg: #283046;

    --primary: #7367f0;
    --blue: #00cfe8;
    --indigo: #6610f2;
    --pink: #e83e8c;
    --red: #ea5455;
    --orange: #ff9f43;
    --yellow: #ffc107;
    --green: #28c76f;
    --teal: #20c997;
    --cyan: #17a2b8;
    --gray: #b8c2cc;
    --gray-dark: #1e1e1e;
    --secondary: #82868b;
    --success: #28c76f;
    --info: #00cfe8;
    --warning: #ff9f43;
    --danger: #ea5455;
    --light: #f6f6f6;
    --dark: #4b4b4b;

    /* font-sizes */
    --fs-900: clamp(5rem, 8vw + 1rem, 9.375rem);
    --fs-800: 3.5rem;
    --fs-700: 1.5rem;
    --fs-600: 1rem;
    --fs-500: 1rem;
    --fs-400: 0.9375rem;
    --fs-300: 1rem;
    --fs-200: 0.875rem;
        
    /* font-families */
    --ff-montserrat: Montserrat,Helvetica,Arial,serif;
}

/* ------------------------ */
/* Reset                    */
/* ------------------------ */

/* Reset guide: https://piccalil.li/blog/a-modern-css-reset/ */

/* Box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset margins*/
body,h1,h2,h3,h4,h5,h6,p,figure,picture {
    margin: 0;
}

h1,h2,h3,h4,h5,h6,p {
    font-weight: 400; /* Default should not be bold*/
}

/* Set up body */
body {
    font-family: var(--ff-montserrat);
    font-size: var(--fs-400);
    color: #b4b7bd;
    background-color: var(--clr-dark);
    line-height: 1.5; /* Default is 1.2, usually too small */
    min-height: 100vh;
    text-rendering: optimizeSpeed;
}

/* Make Image easier to work with */
img, picture {
    max-width: 100%;
    display: block;
}

/* Make form elements easier to work with */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove animations for people who have disabled them */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------ */
/* Utility class            */
/* ------------------------ */

/* Hidden unless made visible by js. */
.admin {
    visibility: hidden;
}

.flex {
    display: flex;
    gap: var(--gap, 1rem); /* Custom gap property, default of 1 rem */
}
.flex--space-between {
    justify-content:space-between;
}
.flex--align-start {
    align-items: start;
}

.grid {
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
    grid-template-columns: 2fr 2fr;
    grid-gap: var(--gap, 1rem);
    grid-auto-rows: minmax(100px, auto);
}

/*Selects everything that is not first child, same as > *:not(:first-child) */
.flow > * + * {
    /*Custom flow-space property, default of 1rem*/
    margin-top: var(--flow-space, 1rem); 
}

.container {
    padding-inline: 2em; /* Inline ignores top and bottom, left and right of 2em, prevent contents from touching the sides. It's the same as writing padding: 0,2em */
    padding-bottom: 2em;
    margin-inline: auto;
    max-width: 90%;
}

.sr-only {
    /* Screen reader only, */
    position: absolute; 
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px; 
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; /* added line */
    border: 0;
}

/* Colors */
.bg-dark { background-color: hsl( var(--clr-dark) );}
.bg-accent { background-color: hsl( var(--clr-light) );}
.bg-white { background-color: hsl( var(--clr-white) );}

.text-dark { color: hsl( var(--clr-dark) );}
.text-accent { color: hsl( var(--clr-light) );}
.text-white { color: hsl( var(--clr-white) );}

/* typography */
/* .ff-serif { font-family: var(--ff-serif); } 
.ff-sans-cond { font-family: var(--ff-sans-cond); } 
.ff-sans-normal { font-family: var(--ff-sans-normal); }  */

.letter-spacing-1 { letter-spacing: 4.75px; } 
.letter-spacing-2 { letter-spacing: 2.7px; } 
.letter-spacing-3 { letter-spacing: 2.35px; } 

.uppercase { text-transform: uppercase; }

.fs-900 { font-size: var(--fs-900); }
.fs-800 { font-size: var(--fs-800); }
.fs-700 { font-size: var(--fs-700); }
.fs-600 { font-size: var(--fs-600); }
.fs-500 { font-size: var(--fs-500); }
.fs-400 { font-size: var(--fs-400); }
.fs-300 { font-size: var(--fs-300); }
.fs-200 { font-size: var(--fs-200); }

.fs-900,
.fs-800,
.fs-700,
.fs-600 {
    /* For larger font sizes, increase line height so that it's not ugly when line break*/
    line-height: 1.1;
}

/* Includes nav and logo */
.primary-header {
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

/* Nav bar */
.primary-navigation {
    --gap: 5rem;
    list-style: none;
    text-align: center;
    background: var(--clr-dark);

    /* Get rid of default styling in <UL> */
    padding: 0;
    margin: 0;
}
.primary-navigation a {
    text-decoration: none;
}
.nav-toggle {
    display: none;
}

/* Contains both canvasContainer and msger */
main {
    /* height: min(50rem, 80vh); */
    height: 80vh;
}

/* Canvas */
.canvasContainer {
    /* border: 1px solid red; */
    flex-direction: column;
    --gap: 0;
    max-width: 40%;
    flex-grow: 1;
    min-height: 20rem;
}

#renderCanvas {
    /* border: 1px solid blueviolet; */
    min-height: 80%;
}

.auth-container{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    max-width: 40%;
}

#loginForm, #signupForm{
    display: flex;
    flex-direction: column;
    gap: var(--gap, 1rem);
}

/* Some how needed, else input would not take the full width of parent */
#loginForm input{
    width: 100%;
}
#signupForm input{
    width: 100%;
}

.CRUDForm{
    display: flex;
    flex-direction: column;
    gap: var(--gap, 1rem);
}
.CRUDForm input{
    width: 100%;
}

label{
    display: block;
    margin-bottom: .2rem;
    color: #d0d2d6;
    font-size: 0.857rem;
}
a {
    text-decoration: none;
    color: #7367f0;
}
.text-center{
    text-align: center;
}
.fa-check {
    padding-left: 0.2em;
    visibility: hidden;
}

.btn {
    color: #fff;
    text-transform: none;
    text-align: center;
    padding: .5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    font-size: var(--fs-400);
    font-weight: 500;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,background 0s,border 0s,-webkit-box-shadow .15s ease-in-out;
}
.btn > a {
    color: #fff;
    text-transform: none;
    text-align: center;
    text-decoration: none;
}
.btn:disabled,
.btn[disabled]{
    border: 1px solid #999999;
    background-color: #cccccc;
    color: #666666;
    pointer-events:none;
}

.btn-outline-primary {
    border: 1px solid #7367f0;
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: rgba(115,103,240,.2);
}
.btn-outline-primary > a {
    color: #7367f0;
}

.btn-primary {
    background: var(--primary);
}
.btn-primary:hover {
    box-shadow: 0 8px 25px -8px #7367f0;
}
.btn-primary:active,
.btn-primary:focus {
    outline: none;
    background-color: #5e50ee;
    border-color: #3e2dea;
}

.btn-danger {
    background: var(--danger);
}
.btn-danger:hover {
    box-shadow: 0 8px 25px -8px var(--danger);
    background-color: #e63233;
    border-color: #e42728;
}
.btn-danger:active, 
.btn-danger:focus {
    outline: none;
    background-color: #e42728;
    border-color: #e21c1d;
}

.suggestionSection {
    --gap: 0.3rem;
    padding: .5rem;
    flex-wrap: wrap;
    background-color: #1f273d;
}

.headerBtn>.btn{
    margin: .2rem;
}

/* Selects all button inside the buttonRow */
#buttonRow > .btn {
    /* padding: 10px; */
    margin: 3px;
    background-color: var(--primary);
    justify-content: center;
    text-align: center;
}

.btn-group{
    padding-top: .3rem;
    justify-content: center;
}
.btn-group > * + *{
    margin-left: .3rem;
}

.mobile-toggle-nav {
    display: none;
}

/* Cards */
.card {
    background-color: #283046;
    background-clip: border-box;
    border-radius: 0.428rem;
    /* margin: auto; */
    word-wrap: break-word;
    width: 100%;
}

.card-header {
    display: flex;
    border-bottom: none;
    padding: 1.5rem;
    background-color: transparent;
}
.card-body {
    flex: 1 1 auto;
    flex-basis: content;
    min-height: 1px;
    padding: 1.5rem;
    padding-top: 0;
}

.card--occupy-row {
    /* Occupy column 1 to column 3 */
    /* grid-column: 1/3; */

    /* -1 spans the entire row */
    grid-column: 1/-1;
}

/* Table */
table, td, tr, th{
    color: #b4b7bd;
    border: 1px solid #3b4253;
    border-collapse: collapse;
}
table{
    width: 100%;
}
td, th{
    padding: .5rem;
}

#quickJoinTable {
    visibility: hidden;
}

/* Select/dropdown */
.custom-select {
    padding: 0.438rem 2rem 0.438rem 1rem;
    border: 1px solid #d8d6de;
    border-radius: 0.357rem;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23d8d6de' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 1rem center/10px 10px;
    background-color: #283046;
    border-color: #3b4253;
    -webkit-appearance: none;
    -moz-appearance: none;

    display: inline-block;
    width: 100%;
    height: 2.714rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
    color: #b4b7bd;
    vertical-align: middle;
}
select {
    word-wrap: normal;
    text-transform: none;
}
select:focus {
    outline: none; /* Needed to overwrite focus visible*/
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    border-color: #7367f0;
    box-shadow: none;
}

option {
    font-weight: normal;
    display: block;
    white-space: nowrap;
    min-height: 1.2em;
    padding: 0px 2px 1px;
}

/* Progress Bar  */
/* progress {
    opacity: 0;
}
.progress-container {
    position: relative;
    display: inline-block;
    background: #eee;
    height: 20px;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.progress-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--success);
} */

.progress-bar {
    background-color: #fefefe;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    height: 20px;
    margin: 10px 0 20px 0;
    width: 100%;
    max-width: 100%;
}

.progress {
    background: var(--success);
    background: -webkit-linear-gradient(to bottom, #125d34  , var(--success));
    background: linear-gradient(to bottom, #125d34  , var(--success));
    border-radius: 3px;
    height: 20px;
    width: 0;
    transition: width 0.5s ease-in;
}

#primary-navigation > li:last-of-type{
    visibility: hidden;
}

/* Divider text */
.divider-text {
    display: block;
    text-align: center;
    overflow: hidden;
    white-space: nowrap; 
}

.divider-text > span {
    position: relative;
    display: inline-block;
}

.divider-text > span:before,
.divider-text > span:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 9999px;
    height: 1px;
    background: #3b4253;
}

.divider-text > span:before {
    right: 100%;
    margin-right: 15px;
}

.divider-text > span:after {
    left: 100%;
    margin-left: 15px;
}

/* Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    /* background-color: rgb(40, 48, 70); */
    
}

/* Modal Content/Box */
.modal-content {
    /* background-color: #fefefe; */
    margin: 10% auto; /* 10% from the top and centered */
    padding: 2rem;
    border: 1px solid #888;
    width: 50%; /* Could be more or less, depending on screen size */
    background-color: rgb(40, 48, 70);
    border-radius: .5rem;
    /* text-align: center; */
    border-style: none;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.2s
}

/* All content inside modal */
.modal-content > * {
    margin-bottom: 1.5rem;
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0; transform: scale(0.5);}
    to {top: 0; opacity: 1; transform: scale(1.0);}
}

/* Check box */
/* Customize the label (the container) */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Hide the browser's default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: var(--light);
    border-color: #404656;
}
/* On mouse-over, add a grey background color */
.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a background color */
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
}
.checkbox-container input:disabled ~ .checkmark {
    background-color: #444b60;
}
.checkbox-container input:disabled:checked ~ .checkmark {
    background-color: rgba(115,103,240,.65);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

  /* Show the checkmark when checked */
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* Radio Button */
/* Customize the label (the container) */
.radio-container {
    display: block;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

  /* Hide the browser's default radio button */
.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

  /* Create a custom radio button */
.radio-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.radio-container:hover input ~ .radio-checkmark {
    background-color: #ccc;
}

/* When the radio button is checked, add a blue background */
.radio-container input:checked ~ .radio-checkmark {
    background-color: var(--primary);
}

  /* Create the indicator (the dot/circle - hidden when not checked) */
.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

  /* Show the indicator (dot/circle) when checked */
.radio-container input:checked ~ .radio-checkmark:after {
    display: block;
}
.radio-container input:disabled ~ .radio-checkmark {
    background-color: #444b60;
}
.radio-container input:disabled:checked ~ .radio-checkmark {
    background-color: rgba(115,103,240,.65);
}

/* Style the indicator (dot/circle) */
.radio-container .radio-checkmark:after {
    top: 9px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: .857rem;
    color: #ea5455;
}
.success-text, .danger-text{
    margin-bottom: .2rem;
}
.success-text {
    color: #28c76f;
}
.danger-text {
    color: #ea5455;
}

/* Customized */
#readyBtn #submitStatus {
    margin-bottom: .3rem;
}

/* Chat */
.msger {
	flex-grow: 3; /* Linked with canvasContainer*/
    display: flex;
    flex-flow: column wrap;
    justify-content: space-between;
    border-radius: 5px;
    /* background: var(--msger-bg); */
    box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
    min-height: 20rem;
    border: 1px solid #404656;
    border-radius: 0.5rem;
}

.msger-header {
    /* display: flex; */
    justify-content: space-between;
    padding: 1rem;
    background: var(--left-msg-bg);
}
.msger-header-title {
    font-size: 1.3rem;
    padding: .5rem;
}

.msger-chat {
    flex: 1;
    overflow-y: auto;
    padding: .5rem;
    /* border: 3px solid red; */
    background-color: #1e232f;
}

.msger-chat::-webkit-scrollbar {
    width: 11px;
}

.msger-chat::-webkit-scrollbar-track {
    background: #ddd;
    border-radius: 6px;
}

.msger-chat::-webkit-scrollbar-thumb {
    background: #b4b7bd;
    width: 6px;
    right: 2px;
    border-radius: 6px;
    position: absolute;
}

.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: .5rem;
}

.msg:last-of-type {
    margin: 0;
}

.chat-room-info {
    width: fit-content;
    margin: 0 auto;
    padding: .2rem .5rem;
    border-radius: 15px;
    background: var(--left-msg-bg);
}

/* .msg-img {
    width: 3em;
    aspect-ratio: 1;
    margin-right: 10px;
    background: #ddd;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 50%;
} */

.msg-bubble {
    max-width: 450px;
    padding: 15px;
    border-radius: 15px;
    background: var(--left-msg-bg);
    box-shadow: 0 4px 24px 0 rgb(34 41 47 / 10%);
}

.msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .3rem;
}

.msg-info-name {
    margin-right: 10px;
    font-weight: bold;
}

.msg-info-time {
    font-size: 0.85em;
}

.left-msg .msg-bubble {
    border-bottom-left-radius: 0;
}

.right-msg {
    flex-direction: row-reverse;
}

.right-msg .msg-bubble {
    /* background: var(--right-msg-bg); */
    border-bottom-right-radius: 0;
    color: #fff;
    background-image: linear-gradient(80deg, rgb(115, 103, 240), rgb(158, 149, 245));
}

/* .right-msg .msg-img {
    margin: 0 0 0 10px;
} */

.msger-chat {
    background-color: #1f273d;
}

.right-msg .msg-img {
    margin: 0 0 0 10px;
}

.msger-inputarea {
    display: flex;
    padding: .5rem;
    border-top: var(--border);
    background-color: #283046;
    border-color: #3b4253;
}
.msger-inputarea > * {
    margin-left: 10px;
}
.msger-input {
    flex: 1;
    background: #283046;
    padding: 0.438rem 1rem;
    background-clip: padding-box;
    border: 1px solid #404656;
    border-radius: 0.357rem;
    color: #FFF;
}

.msger-input:focus {
    outline: none; /* Needed to overwrite focus visible*/
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    border-color: #7367f0;
    box-shadow: none;
}

#roomId {
    display: inline;
}

/* .debug {
    display: none;
} */

/* Column mode and shorten msger container height in phone mode */
@media (max-width: 50rem){
    .auth-container {
        max-width: 85%;
    }
    main {
        display: flex;
        flex-direction: column;
    }
    /* .flex {
        flex-direction: column;
    } */
    .grid {
        flex-direction: column;
        grid-template-columns: repeat(1, 1fr);
    }
    .canvasContainer {
        min-height: 30%;
        min-width: 100%;
        flex-direction: row-reverse;
    }

    #renderCanvas{
        min-width: 100%;
    }

    .msger {
        min-height: 35rem;
    }

    .msger-header-title {
        font-size: 1rem;
        padding: .2rem;
    }

    /* Hide header buttons (scenario and progress btn) in mobile mode for better mobile UI (temp) */
    .headerBtn { 
        display: none;
    }

    .btn-group > * + *{
        margin-left: 0;
        margin-top: .3rem;
    }
    
    .btn-group {
        display: block;
    }

    .primary-navigation {
        position: fixed;
        z-index: 1000;
        inset: 0 0 0 30%; /*  top, right, bottom, left */
        padding: min(20rem, 15vh) 2rem;
        margin: 0;
        flex-direction: column;
        --gap: 3rem;
        background: #283046;
        transform: translateX(100%);
        transition: transform 500ms ease-in-out;
    }
    .primary-navigation[data-visible="true"] {
        transform: translateX(0);
    }

    #primary-navigation > li:last-of-type{
        visibility: visible;
    }
    #logoutForDesktopView{
        visibility: hidden;
    }

    /* Positions the hamburger icon */
    .mobile-toggle-nav {
        display: block; 
        float: right;
        position: absolute;
        z-index: 1001; /* Make sure toggle button is above primary nav */
        right: 2rem;
        top: 1rem;
        border: 0;

        width: 3rem;
        background-color: transparent;
    }

    /* Contains the bars which makes up the icon */
    .hamburger-container {
        display: inline-block;
        cursor: pointer;
    }
    
    .bar1, .bar2, .bar3 {
        width: 35px;
        height: 5px;
        background-color: white;
        margin: 6px 0;
        transition: 0.4s;
        border-radius: 5px;
    }

    /* Rotate first bar */
    .change .bar1 {
        -webkit-transform: rotate(-45deg) translate(-9px, 6px) ;
        transform: rotate(-45deg) translate(-9px, 6px) ;
    }

    /* Fade out the second bar */
    .change .bar2 {
        opacity: 0;
    }

    /* Rotate last bar */
    .change .bar3 {
        -webkit-transform: rotate(45deg) translate(-8px, -8px) ;
        transform: rotate(45deg) translate(-8px, -8px) ;
    }
}