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

    /* Brand Colors */
    --color-bg: #88F0CE;
    --color-surface: #fafffe;
    --color-primary: #14dc9a;
    --color-accent: #2d869a;
    --color-text: #000000;
    --color-muted: #000000;
    --color-border: #14dc9a;
    --color-button: #99EDFF;
    --color-button-disabled: #CCF6FF;
    --color-button-generate: #00D2FF;
    --color-button-text: #000;
    --color-pre-background: #F3E6FF;

    --field-colors: #CCF6FF;
    --button-color: #9CF6D8;
    --button-hover: #14DC9A;
    --info_box: #CCF6FF;
    --user-input-head: #E7CCFF;
    --user-input-background: #F3E6FF;
    --user-input-text:#C280FF;
    --model-output-head: #FFC3EB;
    --model-output-text:#FF68CC;
    --model-output-background: #fdf3f9;
    --new-chat-reset-head:#FFF399;
    --new-chat-reset-p:#FFF9CC;
    --json-info-color: #6400BF;

    --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: 10px; */
    /* justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap; */
    /* height: 95vh;
    min-height: 95vh;
    max-height: 98vh; */ 

     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 ;
    text-align: left ;
    /* 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;
}

#ph {
    color:#e3e3e3;
}
textarea {
    resize: vertical;
}

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


 #logo_footer {
    max-height: 5vh;
     max-width: 25vw;
     
     padding: 2px 20px;
     margin: 1vh 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 {
    width: 95vw;
    max-width: 95vw;
max-height:5vh;
    margin: 0px auto 1vh;
    border-radius: 20px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
}

#header_title h1 {
    /* width: 60%; */
    /* padding: 5px 30px;
    margin: 0px auto;
    background-color: #000;
    border-radius: 50px;
    text-align: center;

}

#header_title img {
    width: 30px;
    height: 30px;

    margin: 0px;
    margin-right: 10px;
    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%; */
    padding: 2px ;
    margin: 0px ;
    font-size: 4.5vh;
    /* 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;
}

.msg p {
    margin-top: 2px;
}

.msg h1 {
    margin-top: 8px;
    font-size: 18px;
}
.msg h2,
.msg h3 {
    margin-top: 8px;
    font-size: 16px;
}

h3.output {

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

}

h3.input {

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

}


.input_msg {
    /* background-color: var(--user-input-background); */
    outline: 2px solid  var(--user-input-text);
  
  
}

.input_head {
  
    background-color: var(--user-input-text);

}

.output_msg {
    /* background-color: var(--model-output-background); */
     outline: 2px solid var(--model-output-text);
   

}


.output_msg,
.input_msg {

    outline-offset: -8px;
     padding-bottom:12px;
     
  
}


.output_head{
    background-color: var(--model-output-text);
}



.output_head,
.input_head {
    color: #fff;
    font-weight: bold;
    border-radius: 15px;
    margin-bottom: 7px;
   
    padding: 2px 10px;
        position: relative;
    z-index: 2;

}
hr {
     border: 0;
    border-top: 1px solid var(--color-border);
    margin: 15px 0px 5px;

}
h3.chat_reset {
    /* background-color: var(--new-chat-reset-head); */
    margin: 10px auto 5px;
    text-align: center;
    padding: 2px auto 5px;
    border-radius: 15px;
    font-size: 19px;

}
p.chat_reset {
    /* background-color: var(--new-chat-reset-p); */
    padding: 2px 8px;
    margin-bottom: 10px;
}

.msg,
#loading_div {
    margin-bottom: 10px;
    padding: 0px 16px;
    padding-bottom:20px;
    border-radius: 14px;
}

#loading_div {
    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.9rem !important;
    color: #000;
    background-color: var(--model-output-background) !important;
}

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

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;
}

/* ====== 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;
}
button:disabled,
#generate-button button:disabled,
#save_button button:disabled  {
    background-color: var(--color-button-disabled) ;
    cursor:auto;
}

/* ====== 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;
}

/*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;
}
#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;
    
}


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


























/* Tooltip container */
.tooltip {
  position: relative;
  display: inline-block;
 

  /* border-bottom: 1px dotted black; If you want dots under the hoverable text */
}

.tooltip img {
display: inline-block;
/* margin-bottom: 0px; */
vertical-align: bottom;
margin-left: 5px;

}
/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  text-wrap: wrap;
  width:18vw;
  max-width: 25vw;
  background-color: black;
  color: #fff;
  text-align: left;
  padding: 5px;
  border-radius: 6px;
  font-weight: normal;
   font-size: 0.85rem;
   bottom: 100%;
  left: 50%;
  margin-left: -300%; /* Use half of the width (120/2 = 60), to center the tooltip */
 
  /* Position the tooltip text - see examples below! */
  position: absolute;
  z-index: 1;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
  visibility: visible;
  /* overflow: visible; */
}
/* .tooltip .tooltiptext::after {
  content: " ";
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
  /* left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
} */ 

























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



/* ====== 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;

}
