:root { /* place vars here */


    --bl-margin: 25px;
    --sidebar-width: 200px;
    --gif-margin: 15px;
    --input-height: 60px;

    --input-default: 60%;
    --input-interact: 61%;

    --sidebar-sort-height: 130px;

    --tag-margin-top: 6px;



    --main-color: #494050;
    --second-color: #403748;
    --third-color: #3c3344;
    --fourth-color: #32293ab6;
    --text-main: #f1f1f1;;
    --text-second: #aaaaaa;

    --yellow: #FFDA09;

    --gradient: radial-gradient(circle, rgba(227,174,238,1) 40%, rgba(148,158,233,1) 100%);

}

body { 

    display: flex;
    flex-direction: column;
    margin: 0;

    background-color: var(--main-color);

    

}


layout {
    display: flex;
}


sidebar {

    /*background-color: var(--main-color);*/
    width: var(--sidebar-width);
    height: 100vh;

    margin-left: var(--bl-margin);

}


#sidebar_sort {

    margin-top: calc(var(--bl-margin) - var(--tag-margin-top));

    width: 100%;
    height: var(--sidebar-sort-height);
    background-color: transparent;

    display: flex; /* Set to flex */
    flex-direction: column; /* Stack children vertically */
    
    align-items: center;

}


#sidebar_divider {

    width: 100%;
    height: 1px;
    background-color: transparent;

    display: flex; /* Set to flex */
    flex-direction: column; /* Stack children vertically */
    
    align-items: center;

}

#sidebar_divider_inner {

    width: 90%;
    height: 100%;
    background-color: var(--third-color);

}


#sidebar_inner { /* SIZING OF THIS NEEDS TO CHANGE AFTER IMPLEMENTING THE SORTING STUFF! */

    margin-top: 10px;
    height: calc(100% - (var(--sidebar-sort-height) + 1px ) - 50px); /* honestly the calc is a little made up but it works.. */
    width: 100%;

    overflow-y: auto; /* Allow vertical scrolling if content overflows */
    
    display: flex; /* Set to flex */
    flex-direction: column; /* Stack children vertically */
    
    align-items: center;

}


.sb_tag {

    user-select: none;

    width:82%; /* for whatever reason setting a max width doesnt persist if you also use padding! */
    /* height: 26px; /* Fixed height for tags */
    margin-top: var(--tag-margin-top);
    padding: 6px 14px 6px 14px;
    
    color: whitesmoke;
    background-color: var(--second-color);

    box-shadow: 0 0 4px 1px rgba(73, 73, 73, 0.075);    

    border-radius: 12px;

    flex-shrink: 0;

    overflow: hidden; /* Hide overflowed text */
    white-space: nowrap; /* Prevent text from wrapping */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */

    font-size: small;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    
    text-align: center;    

    transition: all .2s;

}


.sb_tag:hover {

    color: #FFDA09;
    background-color: var(--third-color);
    box-shadow: 0 0 10px 2px rgba(90, 79, 94, 0.473) !important;

}

.sb_tag_selected {

    color: #3c3344 !important;
    background-color: #FFDA09 !important;
    font-weight: bold;

}

.sb_tag_selected:hover { box-shadow: 0 0 10px 2px rgba(90, 79, 94, 0.473) !important; }

.sb_tag_search_match { outline: dashed 2px var(--yellow); }



 /* Effect when the tag has been applied */
.sb_tag.added {
    box-shadow: 0 0 4px rgb(110, 255, 105) !important; /* Glowing outline */
    transition: all 0.1s ease-in-out;
}

 /* Effect when the tag has been removed */
.sb_tag.removed {
    box-shadow: 0 0 4px rgb(255, 72, 65) !important; /* Glowing outline */
    transition: all 0.1s ease-in-out;
}



.ignore_hover {
    pointer-events: none;
}


main {

    width: calc(100vw - var(--sidebar-width));
    height: 100vh;
    background-color: var(--main-color);

}

.content_container {

    border-radius: 15px;
    overflow: hidden;

    background-color: var(--second-color);
    
    width: calc(100% - calc(var(--bl-margin) * 2));
    height: calc((100% - var(--input-height)) - calc(var(--bl-margin) * 2));

    position: relative;
    margin: 0 auto;

    margin-top: var(--bl-margin);

    display: flex;
    overflow-y: auto;


}

.input_container {
    position: absolute;
    bottom: 0px;
    left: var(--sidebar-width);
    right: 0px;
    height: var(--input-height);

    display: flex; /* Enable Flexbox */
    justify-content: center; /* Center the child horizontally */
    align-items: center; /* Center the child vertically */
}



 #type_input_field {
    
    transition: all .3s;

    height: 80%;
    width: var(--input-default);

    margin-bottom: var(--bl-margin);
    
    background-color: var(--second-color);
    border-radius: 15px;
    box-shadow: 0 0 4px 1px rgba(73, 73, 73, 0.075);
    
    border: transparent;
    outline: none;

    color: whitesmoke;
    text-align: center;

    font-size: large;

    font-family: "Poppins", sans-serif;
    font-weight: 500;

}

#type_input_field::placeholder {

    transition: all .3s;
    
    color: #ffffff2d; /* Lighter color for this specific field */
    
    font-weight: bold; /* Make the placeholder text bold */
    font-size: x-large;
    font-family: "Poppins", sans-serif;
    font-weight: 700;

    transform: translateY(3px);

}

#type_input_field:hover::placeholder { 

    color: #ffffff48; /* Lighter color for this specific field */

}



#type_input_field:hover { 

    width: var(--input-interact);
    box-shadow: 0 0 10px 2px rgba(90, 79, 94, 0.473) !important;

 }

 #type_input_field:focus {

    width: var(--input-interact);
    box-shadow: 0 0 14px 4px rgba(105, 93, 110, 0.473) !important;
}

#type_input_field:focus:hover {

    width: var(--input-interact);
    box-shadow: 0 0 14px 4px rgba(105, 93, 110, 0.473) !important;
}





.columns {
    padding-left: var(--gif-margin);
}


.gif_tile {

    transition: all .2s; 

    margin-top: calc(var(--gif-margin) - 2px);
    border-radius: 10px;
    position: relative;
    width: 100%;
    
    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.075);

    /* so gifs that fail to load are able to be interacted with */
    min-height: 40px;
    min-width: 100%;
    background-color: var(--third-color);

}

.unloaded {

    min-height: 200px !important;

}


.gif_tile:hover {

    
    box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.205) !important;
    opacity: 0.7;

 }

 
 .gif_tile_selected { /* might come back and make the selection also lower the gif saturation, but that might need me to change how it's loaded... */

    outline: dashed 4px var(--yellow);

 }

 /* Effect when the image has been copied */
.gif_tile.copied {
    transform: scale(1.01); /* Slight zoom-in */
    filter: brightness(1.2) contrast(.9) saturate(.8); /* Increase brightness, contrast, and saturation */
    box-shadow: 0 0 20px rgba(236, 152, 253, 0.658) !important; /* Glowing outline */
    opacity: 1;
    transition: all 0.1s ease-in-out;
}


.content_container::-webkit-scrollbar {
    display: none;
}

#sidebar_inner::-webkit-scrollbar {
    display: none;
}









.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    
    /* Always use flex layout */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Hide by default */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.05s linear;
  }
  
  .modal.show {
    visibility: visible;
    opacity: 1;
  }
  
  .modal_content {
    background-color: var(--third-color);
    padding: 20px;
    width: 50%;
    height: 80%;

    min-width: 500px;
    min-height: 653px; /* this is just to make sure the modal doesnt' clip and look silly */

    border-radius: 20px;

    display: flex; /* Set to flex */
    flex-direction: column; /* Stack children vertically */
    
    align-items: center;

    position: relative;
    overflow: hidden;

  }


  #modal_image {

    margin-top: 0%;
    margin-bottom: 10px;
    height: 40%;
    border-radius: 10px;
    max-width: 90%;


  }


  .mi_text {

    color: whitesmoke;
    text-align: center;

    font-size: medium;

    font-family: "Poppins", sans-serif;
    font-weight: 700;

    margin-bottom: 4px;

  }



  .mi_input {

    width: 90%;    
    margin-top: 2px;

    background-color: var(--fourth-color);
    border-radius: 5px;
    box-shadow: 0 0 4px 1px rgba(73, 73, 73, 0.075);
    
    border: transparent;
    outline: none;

    color: var(--text-second);
    text-align: center;

    font-size: small;

    padding: 6px;

    font-family: "Poppins", sans-serif;
    font-weight: 500;

    margin-bottom: 1%;


  }

  .mi_input::placeholder {
    
    color: #ffffff2d;
    
    font-weight: bold;
    font-size: small;
    font-family: "Poppins", sans-serif;
    font-weight: 500;

    transform: translateY(1px);

}


  #modal_footer {

    width: 100%;
    background-color: var(--fourth-color);

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex; /* Set to flex */
    flex-direction: column; /* Stack children vertically */
    
    align-items: center;
    overflow: hidden;

    padding: 10px;

  }

  #modal_footer_text {

    color: whitesmoke;
    font-size: 75%;

    font-family: "Poppins", sans-serif;
    font-weight: 600;

    margin-right: 15px; /* adjusts for padding and weight */

    display: inline-block;

  }


  #modal_tags_holder {

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    padding: 5px;

    margin-top: 5px;

    background-color: var(--fourth-color);
    border-radius: 8px;
    width: calc(90% - 10px); /* the 10 px is just padding either side */

    max-height: 15%;
    min-height: 60px;

    overflow-y: auto; /* Allow vertical scrolling if content overflows */

  }

  #modal_tags_holder::-webkit-scrollbar {
    display: none;
}

  .modal_tag {

    color: var(--text-second);
    padding: 5px 15px 5px 15px;

    font-size: small;
    font-family: "Poppins", sans-serif;
    font-weight: 600;

    background-color: rgb(44, 35, 47);
    border-radius: 13px;

    margin: 3px;

  }

  #modal_tag_input {

    margin-top: 10px;
    width: 55%;

  }




  /* help modal stuff */


.help_section {

    display: flex;
    flex-direction: column;
    
    justify-content: center;
    align-items: center;


    color: var(--text-second);

    font-size: small;
    font-family: "Poppins", sans-serif;
    font-weight: 400;

    width: 90%;

    height: 100%;

}

.help_section::-webkit-scrollbar {
    display: none;
}

.help_heading {

    color: var(--text-main);

    font-size: large;
    font-family: "Poppins", sans-serif;
    font-weight: 600;

    margin-bottom: 10px;

}


.help_keys {

    color: var(--text-main);

    font-family: "Poppins", sans-serif;
    font-weight: 500;

}

.help_blurb {

    margin-bottom: 15px;
    text-align: center;

}

.help_line {

    margin-bottom: 8px;

}



#help_btn {

    position: absolute;

    transition: all .3s;
    
    bottom: calc(var(--bl-margin) - 8px);
    right: var(--bl-margin);

    height: calc(var(--input-height) - 10px);
    width: calc(var(--input-height) - 10px);

    background-color: var(--second-color);
    border-radius: 15px;
    box-shadow: 0 0 4px 1px rgba(73, 73, 73, 0.075);
    
    border: transparent;
    outline: none;

    display: flex;
    flex-direction: column;
    
    justify-content: center;
    align-items: center;


}

#help_btn:hover { 

    box-shadow: 0 0 10px 2px rgba(90, 79, 94, 0.473) !important;

 }

 #help_btn:hover svg path {

    fill: #ffffff48;

 }

 #lifebuoy path {

    transition: all .3s;
    fill: #ffffff2d;

}

#lifebuoy {

    height: 30px;
    
}

 

