/* ====== THEME ROOT (Edit your branding here) ====== */
:root {
    --font-primary: 'Poppins', sans-serif;
    --font-mono: Consolas, 'Courier New', monospace;

    /* Brand Colors */
    --color-bg: #5fe1ff;
    --color-surface: #fafffe;
    --color-msg: #edfbfe;
    --color-primary: #14dc9a;
    --color-accent: #deba08;
    --color-text: #000000;
    --color-muted: #000000;
    --color-border: #14dc9a;
    --color-button: #FFF399;
    --color-button-generate: #FFE300;
    --color-button-disabled: #FFF9CC;
    --color-button-text: #000;
    --color-pre-background: #FFF9CC;

    --field-colors: #CCF6FF;
    --button-color: #9CF6D8;

    --info_box: #F3E6FF;
    --user-input-head: #E7CCFF;
    --model-output-head: #FFE1F5;
    --json-info-color: #6400BF;

    --user-input-head: #E7CCFF;
    --user-input-background: #F3E6FF;
    --user-input-text:#C280FF;
    --model-output-head: #FFC3EB;
    --model-output-text:#FF68CC;
    --model-output-background: #FFE1F5;

   
    --body-font: 'Poppins', sans-serif;
    --heading-font: Consolas, 'Courier New', monospace;


}

/* ====== RESET & BASE STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing:border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    /* padding: 1rem; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    height:100vh;
    max-height: 100vh;
    max-width: 100vw;
    width:100vw;
    overflow: hidden;
    padding-bottom: 2vh;
    /* height: 95vh;
    min-height: 95vh;
    max-height: 98vh; */
}

h1 {
    font-family: var(--heading-font);
    color: #fff;

}

h2,
h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

label {
    display: block;
    margin-top: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="password"],
input[type="number"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

textarea {
    resize: vertical;
}

p.info {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}


 #logo_footer {
     /* /* max-width: 25vw; */
     
     width: fit-content;
     padding: 2px 10px;
      margin: 0.5vh auto;
     background-color: #000;
     border-radius: 50px;
 }

 #logo_footer img {
     max-height: 2vh;
     /* max-width: 20vw; */
     margin: auto;
     display: block;
     /* vertical-align: middle; */

 }

#header_title {
    background-color: #000;
    width: 100vw;
    margin: 1vh auto 1vh;
    height: 6vh;
    max-height: 6vh;
    /* border-radius: 20px; */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2px 20px;
}

#title_logo {
    height: 5vh;
    max-height: 5vh;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: start;
    align-items: center;
}
#title_logo h1 {
    /* width: 60%; */
    font-size: 4.5vh;
    padding: 2px ;
    margin: 0px ;
    /* background-color: #000; */
    /* border-radius: 50px; */
    text-align: left;
    margin-left:5px;
    /* max-height: 5vh; */
    


}

#title_logo img {
    /* object-fit:scale-down;
     */
     height: 90%;
     margin-left: 5px;
     padding: 1px 0px;

}

#navbar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: center;
    max-width: 30vw;
    height:4vh;
    max-height: 4vh;
    gap: 10px;
    
    /* padding:0.5vh 0.5vw; */
    

}

#navbar img {
    /* width: 30px; */
    height: 2.5vh;
    max-height: 2.5vh;
    /* margin: 0px 10px; */

    /* margin-top: auto; */
    /* margin-right: 10px; */
    /* display: block; */
    /* vertical-align: middle; */

}

/* ====== LAYOUT ====== */
.window {
    /* display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap; */

    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-around;
    gap: 20px;
    max-width: 95vw;
   
    height: 90vh;
    /* height:100%; */
    
    width: 100%;
    margin: 0 auto;
    /* overflow: scroll; */
}

.section-style {
    background-color: var(--color-surface);
    padding: 1.5rem;
    border-radius: 0.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    overflow-y: scroll;
    min-width: 300px;
}




/* ====== SIDEBAR ====== */
/* .toggle_container {
    background-color: #000;
    padding: 10px;
    border-radius: 5px;

} */

.sidebar h3 {
    margin-top: 1rem;
    font-weight: 600;

}

.sidebar {
    max-width: 30vw;
    width: 30vw;
}

#result_model_info {
    background-color: var(--info_box);
    padding: 5px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: var(--font-primary);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}

#toggle_system,
#toggle_settings {
    background-color: var(--info_box);
    padding: 5px;
    border-radius: 5px;
    margin-top: 10px;
}

/* ====== CONVO AREA ====== */
#chat-window {

    /* height: 650px;
    min-height: 200px; */
    height: 45vh;
    min-height: 20vh;
    margin-bottom: 1rem;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 0.5rem;
    background: #fff;
}

h3.output {

    background-color: var(--model-output-head);
    margin: 0px 0px 10px 20px;
    padding: 2px 5px;
    border-radius: 3px;

}

h3.input {

    background-color: var(--user-input-head);
    margin: 0px 0px 10px 20px;
    padding: 2px 5px;
    border-radius: 3px;

}

/* .msg,
#loading_div {


} */


#loading_div {
    padding: 0px 12px;
    border-radius: 5px;
    padding-left: 20px;
    font-weight: 700;
    justify-content: center;

}

#loading_div p {
    text-align: center;

}

#loading_div img {
    width: 30px;
    margin: 0px 10px;
    height: 30px;
    vertical-align: middle;
}


pre {
    font-family: var(--font-mono);
}

/* Make code blocks more readable */
/*
pre msg {
    background-color: var(--color-pre-background);
    background: var(--color-pre-background);
    color: var(--json-info-color);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 5px;
} */

.json_format {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}

code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.95rem;
    color: #000;
}

p code,
li code {
    background-color: var(--color-pre-background);
    background: var(--color-pre-background);
    color: #c7254e;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

ul,
li,
ol {
    margin-left: 10px;
}


#button_container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#button_container>div {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#indv-msg {
    display: flex;
    flex-direction: row;
    width: 100%;
    /* margin-bottom:10px; */
    padding: 5px;
    margin: 10px 0px;
    border-radius: 15px;
    /* background-color: var(--color-msg); */
     
}

#indv-msg img {
    width: 50%;
    padding:6px;
}

#indv-msg p {
    margin-left: 10px;
    margin-bottom: 5px;
    
}
#indv-msg .head {
    background-color: var(--user-input-text);
     color: #fff;
    font-weight: bold;
    border-radius: 15px;
    margin: 0px auto 3px -3px;
    
    padding: 2px 10px;
}
#indv-msg .result_details_group {
    display: flex;
    flex-direction: column;
      border-radius: 15px;
    align-items: start;
     outline: 2px solid  var(--user-input-text);
      outline-offset: -6px;
      width:50%;
      margin-left:10px;
}



/* ====== BUTTONS ====== */
button {
    padding: 0.6rem 1rem;
    border: none;
    background-color: var(--color-button);
    color: var(--color-button-text);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#generate-button button {
    background-color: var(--color-button-generate);

}

button:hover,
#generate-button button:hover, 
#save_button button:hover {
    background-color: var(--color-accent);
}


button img {
    width: 25px;
    margin-right: 5px;
    height: 25px;
    vertical-align: middle;
}

/* ====== TOGGLE BLOCKS ====== */
.toggle_container {
    margin-top: 1.5rem;
}

.toggle_img {
    width: 50px;
    height: auto;
    cursor: pointer;
    vertical-align: middle;
}

.toggle_disp {
    display: none;
    margin-top: 1rem;
    background: var(--info_box);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: var(--font-mono);
    overflow-x: auto;
}

#toggle_system,
#toggle_settings {
    display: none;
}










button:disabled,
#generate-button button:disabled,
#save_button button:disabled  {
    background-color: var(--color-button-disabled);
    cursor:auto;

}




/*ADDITIONS WITH PICTURE PASSWORDS ETC*/
.picture_pwds {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.picture_pwds img {
    width: 18%;
    height: 18%;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 40px;
    object-fit: cover;
}

.picture_pwds img.selected {
    border-color: var(--color-accent);
    background-color: var(--color-accent);
    border-radius: 10px;
}
#picture_password button {
    font-size: 14px;
    padding: 10px 20px;
    margin-top: 10px;
    margin-right:5px;
        background-color: var(--color-button-generate);
}
#login_button_info {
    display: flex;
    align-items: center;

}

#result_pwds {
    margin-top: 0.5rem;
    display: flex;
    font-weight: 400;
    font-size: 16px;

    align-content: center;

}
#result_pwds img{
    margin: 0px 5px 0px 15px;

    align-self: center;
    height:20px;
    width:20px;
    /* width: 20px; */
}


#login_auth_button {
    display: flex;
    align-items: center;
    justify-content: center;
}

#login_auth_section {
    background-color: var(--color-button-disabled);
    border-radius: 8px;
    padding: 10px;


}
#login_auth_button button {
    padding: 5px 25px;

}

.using_api_key {
    display: none;



}

.picture_password {
    display: block;

}


#use_api_key button,
#use_pic_pwd button,
#hide_both button {
     font-size: 12px;
    background-color: #fff;
    border-radius: 0px;
    border-color: var(--color-button-disabled);
    border-width: 1px;
    border-style: solid;
    padding: 5px 10px;
    height:max-content;
    text-wrap: nowrap;
}


#use_pic_pwd button {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    
}

#hide_both button {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    color: var(--color-accent);
}

#use_api_key button:disabled,
#use_pic_pwd button:disabled,
#hide_both button:disabled {
    font-size: 12px;
    background-color: var(--color-button);
    cursor: auto;
    
}




/* ====== RESPONSIVE ====== */
/* @media (max-width: 768px) {
    .window {
        flex-direction: column;
    }
} */



/* ====== Scrollbars ====== */
::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.toggle_disp,
#toggle_element,
#result_logging,
#file_saved_ts,
#last_output_ts,
#message_history_div {
    display: none;

}