/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* Reset some basic elements */
/* html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
} */


/* Styles for your main app container */
#app-container-challenge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 70vh;
    background-color: #BDE5F8;
    overflow: auto;
}

#primary-container-challenge {
    display: flex;
    width: 100%;
    margin: auto;
    flex-grow: 1;
    background-color: navy;
    /* margin-top: 10px;
    margin-bottom: 10px; */
}

#left-container-challenge {
    display: flex;
    flex-direction: column;
    flex: 30%;
    background-color: #444;
    border: 3px solid #E87531;
    border-top: none;
    position: relative;
    width: 350px;
    max-width: 350px;
    min-width: 350px;
    /* height: 650px; */
}

#right-container-challenge {
    /* display: flex;
    flex: 80%; */
    flex: 1;
    background-color: #444;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #444;
    overflow: hidden;
}
canvas {
    position: relative;
    top: 0;
    left: 0;
    /* display: block;
    margin: auto; */
}

#pdf-window {
    position: relative;
    max-width: 100vw;
    height: 65vh;
    /* height: calc(70vh - 80px - 10px); */
    overflow: auto;
    flex-grow: 1;
    background-color: #444;
    overflow: hidden;
    cursor: grab;

    /* display: flex; */
    align-items: center;
    justify-content: center;
}

.loading-overlay {
    display: none; /*Initially hidden*/
    /* display: block; */
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white overlay */
    z-index: 1000; /* Ensure it appears on top */
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the icon horizontally and vertically */
    color: #E87531;
}

.loading-overlay p {
    margin-top: 10px;
    font-size: 3rem;
    color: #E87531;
}

.loading-overlay .material-symbols-outlined {
    font-size: 8rem;  /* Adjust this value to make it bigger or smaller */
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


#bottom-bar {
    display: flex;
    width: 100%;
    height: 50px;
    background-color: black;
    align-items: center;
    justify-content: center;
    /* color: white; */
    
}

#bottom-bar .sheetName {
    display: block;
    color: #f2f2f2;
    border: 1px solid #f2f2f2;
    border-radius: 5px;
    padding: 5px 0px;
    width: 400px;
    text-align: center;
    background-color: #444;
}

button {
    outline :0;
    border: none;
    border-radius: 0px;
    color: white;
    background: black;
    width: 100px;
    height: 40px;
    transition: all .1s ease-in-out;
}

button:hover {
    background:  none;
    border: 3px solid black;
    color: black;
}

.button-icon {
    display: flex;
    outline :0;
    border: none;
    border-radius: 0px;
    color: #E87531;
    background: black;
    width: 50px;
    height: 50px;
    font-size: 40px;
    text-align: center;
    justify-content: center;
    transition: all .1s ease-in-out;
    padding: 12px;
}

.button-icon:hover {
    background: none;
    border: 1px solid #E87531;
    color: #E87531;
}

.input-bar {
    width: 50%; /* Adjust as needed */
    padding: 10px;
    margin: 5px auto; /* centering the input field, adjust as needed */
    border: 2px solid #E87531;
    border-radius: 4px; /* for rounded corners */
    font-size: 12px; /* adjust as needed */
    color: white;
    line-height: 1.0; /* adjust as needed */
    text-align: center;
    background: black;
}

/* Sidebar */
.tab-header {
    display: flex;
    justify-content: space-between;
    background-color: #ddd;
    border-bottom: 2px solid #E87531;
}

.tablink {
    background-color: #444;
    color: white;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 0px 10px 0px;
    font-size: 17px;
    width: 50%;
}

.tablink.hover {
    background-color: #E87531;
}

.tabcontent {
    padding: 0px 0px;
    /* border: 3px solid #E87531; */
    /* min-height: inherit; */
    height: 100%;
    overflow: hidden;
}

.tablink.active {
    background-color: #E87531;
}

.tablink.deactivate {
    /* background-color: rgba(255, 255, 255, 0.2); */
    background-color: #ccc;
    color: #888;
    pointer-events: none;
}



#bookmarks {
    display: flex;
    flex-direction: column;
    max-height: 565px;
    overflow-y: auto;
}

.bookmark-button {
    outline: 0;
    border-bottom: 1px solid white;
    border-radius: 0px;
    color: white;
    background: #444;
    width: 95%;
    height: fit-content;
    min-height: 40px;
    transition: all .1s ease-in-out;
    /* margin: 5px, 5px, 5px, 5px; */
    margin-left: 5px;
    padding: 0px;
    box-sizing: border-box;
    text-align: left;
}
.bookmark-button:hover {
    background: #E87531;
    color: white;
}
.bookmark-page-button {
    margin-left: 20px;
    width: 90%;
    padding-right: 5px;
}


/* Chatbot */
.chatbot {
    background: #444;
    height: 100%;
    max-height: 565px;
}
.chatbot header {
    background: #E87531;
    padding: 8px 0;
    text-align: center;
}
.chatbot header h2 {
    color: #fff;
    font-size: 1.0rem;
}
.chatbot .chatbox {
    /* how to make as tall as container?? */
    height: 92%;
    overflow-y: auto;
    padding: 30px 20px 40px;
}
.chatbox .chat {
    display: flex;
}
.chatbox .incoming span {
    height: 32px;
    width: 32px;
    color: #fff;
    align-self: flex-end;
    background: #E87531;
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    margin: 0 10px 7px 0;
}
.chatbox .outgoing {
    margin: 20px 0;
    justify-content: flex-end;
}
.chatbox .chat p {
    max-width: 75%;
    white-space: pre-wrap;
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    /* color: #fff;
    background: #E87531; */
    color: #000;
    background: #f2f2f2;
}
.chatbox .chat p.error {
    color: #721c24;
    background: #f8d7da;
}
.chatbox .incoming p {
    color: #fff;
    background: #E87531;
    /* color: #000; */
    /* background: #f2f2f2; */
    border-radius: 10px 10px 10px 0;
}

.rec-container {
    margin-top: 340px;
}
.rec-container .inactive {
    display: none;
}
/* .recommend {
    max-width: 85%;
    white-space: pre-wrap;
    font-size: 0.85rem;
    padding: 12px 16px;
} */
.chatbox .recommend p {
    max-width: 95%;
    color: #ccc;
    background: #444;
    /* margin-top: 400px; */
    border: 1px solid #ccc;
    border-radius: 10px 10px 10px 10px;
}
/* .chatbox .recommend .inactive p {
    display: none;
} */
.inactive {
    display: none;
}
.chatbot .chat-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    gap: 5px;
    background: #fff;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
}
.chatbot .chat-input.deactivate {
    /* background-color: rgba(255, 255, 255, 0.2); */
    background-color: #ccc;
    color: #888;
    pointer-events: none;
}
.chat-input-tab .deactivate {
    display: none;
    position: absolute;
    bottom: 0;
    width: 100%;
    gap: 5px;
    background: #fff;
    padding: 5px 20px;
    border-top: 1px solid #ccc;
}
.chatbot .chat-input-tab.deactivate {
    /* background-color: rgba(255, 255, 255, 0.2); */
    background-color: #ccc;
    color: #888;
    pointer-events: none;
}
.chat-input-tab textarea {
    display: none;
    height: 40px;
    width: 100%;
    border: none;
    outline: none;
    max-height: 180px;
    font-size: .8rem;
    resize: none;
    padding: 16px 15px 16px 0;
}
.chat-input-tab span {
    display: none;
    align-self: flex-end;
    height: 50px;
    line-height: 50px;
    color: #E87531;
    font-size: 1.35rem;
    cursor: pointer;
    visibility: hidden;
    align-items: center;
}
.chat-input textarea {
    height: 40px;
    width: 100%;
    border: none;
    outline: none;
    max-height: 180px;
    font-size: .8rem;
    resize: none;
    padding: 16px 15px 16px 0;
}
.chat-input span {
    align-self: flex-end;
    height: 50px;
    line-height: 50px;
    color: #E87531;
    font-size: 1.35rem;
    cursor: pointer;
    visibility: hidden;
    align-items: center;
}
.chat-input textarea:valid ~ span {
    visibility: visible;
}
.chat-input-tab textarea:valid ~ span {
    visibility: visible;
}


/* iPhone15 vertical */
@media (max-width: 786px) {
    .viewer.active {
        top: -560px;
    }
    .viewerContainer {
        margin: 0 auto;
        padding: 0 20px;
        height: 50%;
    }
    #app-container-challenge {
        /* display: flex;
        flex-direction: column;
        justify-content: center; */
        min-height: 55vh;
        max-height: 65vh;
    }
    #primary-container-challenge {
        flex-direction: column-reverse;
    }
    #right-container-challenge {
        flex: 48%;
    }
    #pdf-window {
        height: 200px;
        width: 100%;
        position: relative;
        overflow: hidden;
        flex-grow: 0;
        background-color: #444;
        cursor: grab;
    }
    #left-container-challenge {
        flex: 50;
        flex-direction: column-reverse;
    }
    .tab-header {
        justify-content: flex-start;
    }
    .tablink {
        padding: 10px 0px 10px 0px;
        font-size: 17px;
        width: 15%;
        height: 100%;
    }
    .chatbot .chat-input {
        display: none;
    }
    .chat-input textarea {
        display: none;
    }
    .chat-input span {
        display: none;
    }
    .chat-input-tab {
        bottom: 0;
        width: 70%;
        display: flex;
        gap: 5px;
        background: #fff;
        padding: 5px 0px;
        border: 3px solid #E87531;
    }
    .chat-input-tab textarea {
        display: flex;
        height: 30px;
        width: 80%;
        max-height: 30px;
        padding: 10px 10px 10px 10px;
    }
    .chat-input-tab span {
        display: flex;
        align-self: flex-end;
        height: 35px;
        line-height: 50px;
        color: #E87531;
        font-size: 1.35rem;
        cursor: pointer;
        visibility: hidden;
        align-items: center;
    }
    .chat-input textarea:valid ~ span {
        visibility: visible;
    }
    .chat-input-tab.deactivate {
        bottom: 0;
        width: 70%;
        display: flex;
        gap: 5px;
        background: #ccc;
        padding: 5px 0px;
        border: 3px solid #ccc;
        pointer-events: none;
    }
    .chat-input-tab.deactivate textarea {
        display: flex;
        height: 30px;
        width: 80%;
        max-height: 30px;
        padding: 10px 10px 10px 10px;
        color: #888;
        background: #ccc;
    }
    .input-bar {
        width: 50%; /* Adjust as needed */
        padding: 10px;
        margin: 5px auto; /* centering the input field, adjust as needed */
        border: 2px solid #E87531;
        border-radius: 4px; /* for rounded corners */
        font-size: 8px;
        color: white;
        line-height: 1.0; /* adjust as needed */
        text-align: center;
        background: black;
    }

    #bottom-bar .sheetName {
        padding: 2px 0px;
        font-size: .8rem;
        max-width: 250px;
        height: 90%;
    }
    
    .chatbot .chatbox {
        max-height: 150px;
        padding: 30px 20px 0px;
    }
    .chatbox .outgoing {
        margin: 0px 0px;
    }
    .chatbox .chat p {
        padding: 5px 10px;
    }
    .chatbox .incoming span {
        margin: 0 10px 15px 0;
    }
    #bookmarks {
        max-height: 165px;
    }
    .bookmark-button {
        min-height: 25px;
        font-size: 10px;
    }
    #bottom-bar {
        height: 30px;
    }
    .button-icon {
        display: flex;
        outline :0;
        border: none;
        border-radius: 0px;
        color: #E87531;
        background: black;
        width: 25px;
        height: 25px;
        font-size: 20px;
        text-align: center;
        justify-content: center;
        transition: all .1s ease-in-out;
        padding: 2px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    
}

/* iPhone15 horizontal */
@media (max-height: 500px) {
    .demo {
        height: 140vh;
    }
    .demo-container {
        max-width: 1800px;
        width: 100%;
        margin: 0 auto;
        padding: 0 40px;
        margin-bottom: 100px;
    }
    #bookmarks {
        max-height: 305px;
    }
    .chatbot {
        max-height: 350px;
    }
    #pdf-window {
        height: 300px;
        width: 100%;
        position: relative;
        overflow: hidden;
        flex-grow: 0;
        background-color: #444;
        cursor: grab;
    }
    #left-container {
        flex: 20%;
        width: 150px;
        max-width: 250px;
        min-width: 100px;
        height: 350px;
        flex-direction: column-reverse;
    }
    .chatbox .incoming p {
        font-size: 10px;
    }
    .chatbox .incoming span {
        height: 22px;
        width: 22px;
        font-size: 18px;
        line-height: 22px;
        border-radius: 4px;
        margin: 0 10px 7px 0;
    }
    .chatbox .chat p {
        font-size: 12px;
    }
    .chatbot .chat-input {
        padding: 1px 20px;
        display: none;
    }
    .chat-input textarea {
        display: none;
    }
    .chat-input span {
        display: none;
    }
    .input-bar {
        width: 50%; /* Adjust as needed */
        padding: 10px;
        margin: 5px auto; /* centering the input field, adjust as needed */
        border: 2px solid #E87531;
        border-radius: 4px; /* for rounded corners */
        font-size: 8px;
        color: white;
        line-height: 1.0; /* adjust as needed */
        text-align: center;
        background: black;
    }

    #bottom-bar .sheetName {
        padding: 2px 0px;
        font-size: .8rem;
    }
    .bookmark-button {
        font-size: 12px;
    }
    #bottom-bar {
        height: 25px;
    }
    
}