/*
align-items 
justify-content
*/

/* stuff to enforce login */ 
#loginOverlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    justify-content: center; 
    align-items: center; 
    z-index: 102;
}

#loginOverlay div {
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); 
    text-align: center; 
    width: 300px;
}

#access-code {
    width: 100%; 
    margin-bottom: 10px; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px;
    box-sizing: border-box;
}

#submit-access-code-button {
    width: 100%; 
    padding: 10px; 
    background-color: #4285f4; 
    color: white; 
    border: none; 
    border-radius: 4px;
}

#logout-button {
    position: fixed; 
    z-index: 1000; 
    background-color: #cc446633; 
    border-radius: 20%;
    border-color: #cc4466;
    top: 10px; 
    right: 10px; 
    font-size: 1em; 
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
    padding: 5px; 
}
#logout-button:hover {
    background-color: #cc446666; 
}






body {
    font-family: Nunito;
    display: block;
    height: 100vh;
    background-color: #f5f5f5;
    margin: 0;
}


.kpsgpt-text h1 {
    display: block; 
    top: 10; 
    width: 100%; 
    text-align: center;
}



.all-content {
    width: 100wh; 
    height: 100%; 
    display: flex; 
    background-color: #f5f5f5;
    justify-content: center;
    align-items: flex-start;
}


/* container contianing all the data  */ 
.container {
    display: block; 
    width: 80%;
    max-width: 600px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
}


/* top toolbar */ 
.top-toolbar {
    display: flex; 
    justify-content: space-between;
    position: relative; 
    margin-bottom: 10px;
}

.help-button {
    position: relative;
    top: 10px;
    left: 10px;
    background-color: transparent;
    border-color: #4285f4;
    border-radius:10%;
    color: #4285f4;
    font-size: 16px;
    cursor: pointer;
    width: fit-content;
    z-index: 1;
    margin-bottom: 10px; 
}
.help-button:hover {
    background-color: #4286f422;
}

.clear-button {
    position: relative; 
    top: 10px; 
    right: 10px; 
    background-color: transparent;
    border: none; 
    border-radius: 50%;
    width: fit-content; 
    color: #222222bb;
    font-size: xx-large;
    z-index: 1;
    margin-bottom: 10px; 
    aspect-ratio: 1.0;
}
.clear-button:hover {
    background-color: #22222222;
}




/* Input textbox */ 
#inputText {
    width: 100%;
    height: 150px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(211, 211, 211, 0.6);
    border-radius: 4px;
    resize: none;
    box-sizing: border-box;
}
@media only screen and (max-width: 700px) {
    #inputText {
        height: 40vh;
    }
}


/* translate button */
#translate-button {
    width: 100%;
    padding: 10px;
    background-color: #362a3b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
#translate-button:hover {
    background-color: #3d0053;
}

/* Loading bar */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #4285f4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    display: none;
    margin: 10px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}





/* Rendered Markdown output */
#renderedOutput {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(211, 211, 211, 0.3);
    border: 1px solid rgba(211, 211, 211, 0.6);
    border-radius: 4px;
}



/* save button */ 
#save-button {
    width: 100%;
    padding: 10px;
    background-color: #362a3b ;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
#save-button:hover {
    background-color: #3d0053;
}






/* Modal styling for the help dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    position: relative;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}





/* Sidebar styles */
.sidebar {
    width: 300px;
    height: 100%;
    background-color: #f9f9f9;
    position: fixed;
    top: 0;
    left: -300px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #4285f4;
    color: white;
}


/* rotate animation for refresh button */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.refresh-button {
    background-color: transparent;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease; 
}

.refresh-button.rotating {
    animation: rotate 1s linear infinite;
}
  
.refresh-button:hover {
    background-color: #55555522;
}


 
.close-sidebar {
    background: none;
    border: none;
    color: #333333cc;
    font-size: 30px;
    cursor: pointer;
}

  
  
.toggle-sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 101;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
}
  
.toggle-sidebar:hover {
    background-color: #357ae8;
}





/* Chat History */
#chatHistory {
    list-style: none;
    padding: 0;
}

#chatHistory li {
    display: flex; 
    align-items: center; 
}
  
.chatHistoryItem {
    padding: 15px;
    font-size: 14px;
    color: #333;
    margin: 10px 0;
    border-radius: 4px;
    cursor: pointer;
    width: 250px; 
    overflow: ellipsis; 
}

.chatHistoryItem:hover {
    background-color: #55555533;
}


.delete-history-item-button {
    background: none;
    border: none;
    border-radius: 4px;
    color: #662200;
    font-size: 30px;
    cursor: pointer;
    height: 30px; 
    width: 30px; 
}
.delete-history-item-button:hover {
    color: #ff6600;
}




#chatHistory p { /* just the text to say no chat history is available */
    padding: 15px;
    font-size: 14px;
    color: #333;
    margin: 10px 0;
}
  

  