/*--- FONT ---*/
/*
@font-face {
    font-family: "Xolonium";
    src: url('fonts/Xolonium-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "Xolonium_regular";
    src: url('fonts/Xolonium-Regular.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}*/

*{
    -webkit-user-drag: none;
}

/*---SLIDES SYSTEM---*/

div.slide.visible{
    opacity: 1;
    z-index: 1;
}
div.slide.hidden{
    opacity: 0;
    z-index: -99;
}
div.slide.hidden #logo{
    display: none;
}
div.slide.hidden #logoLogin{
    display: none;
}

/*--- General ---*/

body{
    overflow-x: hidden;
}

.bg{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url(pics/back.webp);
    background-color: black;
    background-size: cover;
    z-index: -10;
}

#infoPanel::-webkit-scrollbar,#marketHomePage::-webkit-scrollbar,#rising_stocks::-webkit-scrollbar,#declining_stocks::-webkit-scrollbar,#portfolio::-webkit-scrollbar{
    display: none;
    opacity: 0;
}

button:not(#buyButton,#sellButton):hover{
    transform: scale(1.05,1.05);
    cursor: pointer;
    z-index: 99999999;
}

#rising,#falling td:hover{
    cursor: pointer;
}

.bestStock_name:hover{
    cursor: pointer;
    text-decoration: underline;
}

#portfolioContent tr:first-child:hover{
    cursor: default;
    background: rgba(0, 0, 0, 0.0);
}

table tr:hover{
    background-color: rgba(11, 19, 53, 0.75);
    transition: ease-in 0.25s;
    border: none;
    cursor: pointer;
}

.bestStock_name{
    text-align: left;
    cursor: pointer;
}

.tbutton{
    background-color: #0A205A;
    opacity: 0.8;
    border-radius: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    transition: ease-in 0.2s;
    width: 5rem;
    height: 2.5rem;
    margin: 0;
    z-index: 1;
}

.tbutton:hover{
    cursor: pointer;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 1rem 0 rgba(185, 4, 142, 0.5);
}

.tbuttonSelected{
    background-image: linear-gradient(180deg, #0f39ab 0%, #0A205A 100%);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 1rem 0 rgba(185, 4, 142, 0.5);
    border-radius: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    transition: ease-in 0.2s;
    width: 5rem;
    height: 2.5rem;
    margin: 0;
    z-index: 1;
}

.tbuttonSelected::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 0.2rem;
    background-color: white;
    border-radius: 0.1rem;
}

.errorText{
    position: relative;
    top: 0.2rem;
    width: 90%;
    max-height: 3rem;
    height: 90%;
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: red;
    margin-top: 1rem;
    opacity: 0;
}

h2 {
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    margin-left: 1rem;
    color: white;
}

#logo{
    max-width: 50rem;
    width: 100%;
    height: auto;
    position: fixed;
    top: 10rem; 
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

div.slide.hidden button{
    display: none;
}

/*--- Popups ---*/

#notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    max-width: 20rem;
    border: solid 0.3rem rgba(11, 21, 59, 0.85);
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1.3rem;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: slidelft 1.25s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slidelft {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
    
}

@keyframes slidedasx {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
    
}

#notificationInfo{
    width: 100%;
    font-family: 'Xolonium', sans-serif;
}

#popup{
    position: fixed;
    top: 20%;
    left: 33%;
    width: 25vw;
    border: solid 0.3rem rgba(11, 21, 59, 0.85);
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    padding: 1.5rem;
    z-index: 9999;
    transition: all 0.5s;
    box-shadow: #1E1E1E;
}

#purchase_info{
    display: block;
    width: 95%;
    height: auto;
    font-family: 'noto sans', sans-serif;
    font-size: 1.5rem;
    color: white;
    padding: 0.5rem;
}

#popup_buttons{
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
}

#popup button{
    background-color: #0A205A;
    color: white;
    font-size: 1.5rem;
    font-family: 'noto sans', sans-serif;
    font-weight: bold;
    border: none;
    border-radius: 1rem;
    text-align: center;
    padding: 0.7rem;
    height: auto;
    width: auto;
}

/*--- rotation animation ---*/

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

div.planet{
    position: fixed;
    top: 110vh;
    left: 50%;
    width: 41rem;
    height: 41rem;
    background-image: url('pics/planetEarth.webp');
    background-size: cover;
    transform: translate(-50%, -50%);
    animation: rotate 100s linear infinite;
}

/*div.shadow{
    position: absolute;
    top: 0;
    left: 0;
    width: 30rem;
    height: 30rem;
    background-image: url('pics/planetShadow.webp');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-50%,-50%);
}*/

/*--- Landing Page ---*/
#landingPageText{ /*--- DA QUI MANUTENZIONE DEL CSS!---*/
    position: fixed;
    left: 48%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 45%;
    text-shadow: 2px 2px 2px black;
}

/*---LoginPage---*/

div.slide.visible #logoLogin{
    max-width: 50rem;
    width: 100%;
    height: auto;
    position: fixed;
    top: 5rem; 
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: top 2s ease, left 2s ease;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 1rem;
}

div.slide.visible #planetLogin {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: top 2s ease, left 2s ease;
    z-index: -1;
}
div.slide.hidden #planetStatic {
    display: none;
}

div.slide.visible #planetStatic {
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: -1;
}
div.slide.hidden #planetStatic2 {
    display: none;
}

div.slide.visible #planetStatic2 {
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: -1;
}

div.slide.visible #log_reg_back{
    position: fixed;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    background-color:rgba(0, 0, 0, 0.75);
    width: 100%;
    max-width: 30rem;
    padding: 1rem;
    border-radius: 1.5rem;
    text-align: center;
    z-index: 0;
}

div.slide.hidden #log_reg_back .content{
    display: none;
}

div.slide.visible #log_reg_back .content {
    opacity: 1;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

div.slide.visible input.log_reg_input{
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: #FFFFFF;
    font-size: 1.3em;
    max-height: 2rem;
    height: 100%;
    width: 90%;
    background-color: rgba(30, 30, 30, 0.85);
    border: none;
    padding: 2%;
    border-radius: 0.4rem;
    margin-top: 1rem;
}

#loginError{
    position: relative;
    width: calc(100% - 3rem);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    margin-top: 1rem;
    height: 2rem;
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: red;
    opacity: 0;
}

div.slide.visible .buttons_log_reg{
    position: relative;
    margin: 0.5rem auto;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 1;
}

div.slide.visible .buttons_log_reg button {
    position: relative;
    flex: 0 1 auto;
}

div.slide.visible .buttons_log_reg button{
    background-color: #0A205A;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    padding: 1rem;
    padding-right: 2.5rem;
    padding-left: 2.5rem;
    margin-right: 1rem;
    margin-left: 1rem;
    border: none;
    border-radius: 0.4rem;
    z-index: 1;
}

/*--- Register Page ---*/

div.slide.hidden #registerPage_back{
    display: none;
}

div.slide.visible #registerPage_back{
    position: fixed;
    top: 62%;
    left: 50%;
    transform: translate(-50%,-50%);
    background-color: rgba(0, 0, 0, 0.75);
    width: 100%;
    max-width: 30rem;
    padding: 1rem;
    border-radius: 2rem;
    text-align: center;
    margin: 1rem;
    z-index: 0;
}

div.slide.visible #log_reg_back .content {
    opacity: 1;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

#registerError{
    position: relative;
    width: calc(100% - 3rem);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    margin-top: 1rem;
    height: 2rem;
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: red;
    opacity: 0;
}

div.slide.visible .register_buttons{
    position: relative;
    margin: 0.5rem auto;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 1;
}

div.slide.visible .register_buttons button {
    position: relative;
    flex: 0 1 auto;
}

div.slide.visible .register_buttons button{
    background-color: #0A205A;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    padding: 1rem;
    padding-right: 2.5rem;
    padding-left: 2.5rem;
    margin-right: 1rem;
    margin-left: 1rem;
    border: none;
    border-radius: 0.4rem;
    z-index: 1;
}

input.register_input{
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: #FFFFFF;
    font-size: 1.3em;
    height: 100%;
    width: 90%;
    background-color: rgba(30, 30, 30, 0.85);
    border: none;
    padding: 2%;
    border-radius: 0.4rem;
    margin-top: 6%;
}

.minorButton{
    background-color: rgba(0, 0, 0, 0) !important;
    padding-top: 0.8rem !important;
    padding-bottom: 0.2rem !important;
}

.minorButton:hover{
    text-decoration: underline;
}

div.slide.hidden #changePassword_back{
    display: none;
}

div.slide.visible #changePassword_back{
    position: fixed;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    background-color:rgba(0, 0, 0, 0.75);
    width: 100%;
    max-width: 30rem;
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    z-index: 0;
    font-family: 'Xolonium_regular', sans-serif;
    font-weight: bold;
    color: #FFFFFF;
}

div.slide.visible #changePassword_back .content {
    opacity: 1;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

div.slide.visible #changePassword_back .register_input {
    margin-top: 1.5rem;
    margin-bottom: 1.2rem;
}

div.slide.visible .passwordChange_buttons{
    display: flex;
    gap: 5rem;
    padding: 0.5rem;
    margin-left: 3rem;
    margin-right: 2rem;
}

div.slide.visible .passwordChange_buttons button {
    background-color: #0A205A;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    padding: 1rem;
    padding-right: 2rem;
    padding-left: 2rem;
    border: none;
    border-radius: 0.4rem;
    z-index: 1;
}

/*--- Save Page ---*/

div.slide.visible #saves {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5rem;
}

div.slide.visible #saves_back {
    position: absolute;
    left: 50%;
    top: 35%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    width: 20rem;
    height: 90%;
    max-height: 24rem;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    z-index: 1;
}

.save-box {
    width: auto;
    height: 6.5rem;
    margin: 1rem auto;
    background-color: #111525;
    opacity: 65%;
    color: white;
    font-family: 'Xolonium_regular', sans-serif;
    font-size: 1.5em;
    border: 3px solid gray;
    border-radius: 0.5rem;
    cursor: pointer;
}

.save-box.new-save {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1E1E1E;
    opacity: 70%;
    font-size: 1.5rem;
    font-weight: bold;
}

div.slide.hidden #saves_back{
    display: none;
}

.save-id{
    font-size: 1.4rem;
    text-align: center;
    font-weight: bold;
    padding-top:0.8rem;
}
.balance-date{
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 2rem;
}
.save-date{
    font-size: 1rem;
    font-weight: bold; 
    padding-right:0.8rem;  
}
.save-balance{
    font-size: 1rem;
    font-weight: bold;
    padding-left:0.8rem;
}

/*--- Loading ---*/

#loading{
    position: absolute;
    font-family: 'noto sans', sans-serif;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    z-index: 999;
}

#loading h2{
    margin-top: 11rem;
    font-size: 4rem;
    text-align: center;
}

#loading div{
    margin-top: 5rem;
    font-size: 1rem;
    text-align: center;
}

/*.loadingBar svg polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  
  .loadingBar svg polyline#back {
    fill: none;
    stroke: #111525;
  }
  
  .loadingBar svg polyline#front {
    fill: none;
    stroke: #0A205A;
    stroke-dasharray: 48, 144;
    stroke-dashoffset: 192;
    animation: dash_682 1.4s linear infinite;
  }
  
  @keyframes dash_682 {
    72.5% {
      opacity: 0;
    }
  
    to {
      stroke-dashoffset: 0;
    }
  }
*/

/*--- Market Home ---*/

div.slide.visible #marketHomePage{
    width: 100%;
}

div.slide.hidden .market_back {
    display: none;
}

div.slide.visible .market_back{
    margin: 0.5rem;
    background-color: rgba(11, 21, 59, 0.75);
    border-radius: 2rem;
    z-index: 0;
}

div.slide.visible #best_stock,div.slide.visible #singleStock  {
    transform: none;
    margin-top: 3rem;
    margin-bottom: 0.7rem;
    height: auto;
    max-width: 96%;
    padding: 1.25rem;
    padding-bottom: 0.5rem;
}

div.slide.visible #rising_stocks, div.slide.visible #declining_stocks{
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
    margin: 0.5rem;
    height: 27rem;
    width: 42rem;
    padding-left: 1.25rem;
    padding-bottom: 1rem;
}

div.slide.visible #declining_stocks {
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
    margin: 0.5rem;
    height: 27rem;
    width: 42rem;
    padding-left: 1.25rem;
    padding-bottom: 1rem;
}

div.slide.visible #rises_falls{
    display: flex;
    gap: 4rem;
}

div.slide.visible #relativeStrenght {
    overflow-y: auto;
    transform: none;
    margin-top: 2rem;
    height: 64%;
    padding-left: 1.25rem;
}

.accessibility{
    position: fixed;
    top: 0;
    right: 1%;
    margin: 1rem;
    transform: none;
    height: 10rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    padding-bottom: 1.1rem;
    background-color: rgba(0,0,0,0.80);
    border-radius: 1.5rem;
    border: 0.2rem solid rgba(11, 21, 59, 0.75);
    z-index: 9999;
    display: none;
}

div.slide.visible #sessionInfo{
    display: flex;
    width: 100%;
}

.accessibility h4,h5{
    margin: 0.5rem;
    font-family: "Noto sans";
    font-weight: normal;
    color:white;
}
#cur_date{
    font-size: 1.4rem;
    text-align: center;
    font-weight: bold;
}
#balanceStocks{
    display: flex;
    justify-content: space-between;
    width: 100%;
}
#my_balance{
    font-size: 1.2rem;
    font-weight: bold;
    padding-left: 2.5rem;
}
#my_stocks{
    background-color: #0A205A;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    max-width: 10rem;
    width: 10rem;
    height: 2rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    border: none;
    cursor: pointer;
    border-radius: 0.9rem;
    z-index: 2;
}

#my_stock_pic{
    padding-left: 0.5rem;
    width: 1rem; 
    height: auto;
}

#logoHome{
    margin: 0.5rem auto 0 auto;
    width: 24rem;
    display: block;
}

.time_buttons{
    display: flex;
    gap: 1rem;
    margin: 1rem;
    margin-left: 3rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.button-group button {
    background-color: #0A205A;
    opacity: 0.8;
    border-radius: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    transition: ease-in 0.2s;
    width: 5rem;
    height: 2.5rem;
    margin: 0;
    z-index: 1;
}

.button-group button:hover {
    cursor: pointer;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 1rem 0 rgba(185, 4, 142, 0.5);
}

#rising_stocks h3,#declining_stocks h3{
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 2.5rem;
    margin-top: 3rem;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

#relativeStrenght h3{
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 2rem;
    margin: 1rem;
    margin-top: 2rem;
    top: 0%;
}

#stock_info{
    display: flex;
}

div.stock_header{
    color: white;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    font-size: 2rem;
    width: auto;
    margin: 1rem;
    margin-left: 1.5rem;
}

.bestStock_value{
    margin: 1rem;
}

.bestStock_percentage{
    margin: 1rem;
}

.graf{

    display: block;
    width: 80rem;
    height: 20rem;
    margin: 1rem;
    margin-top: 2rem;
    margin-left: 4rem;
}

.graf #bestStock_graf{
    display: inline !important;
    width: auto !important;
    height: auto !important;
    max-height: 18rem;
}

.trend{
    width: 37rem;
    margin-top: 1rem;
    margin-left: 1.5rem;
    border-bottom-style: solid;
    border: #FFFFFF;
}
#rising,#falling{
    width: 37rem;
    margin-top: 1rem;
    margin-left: 1.5rem;
    border-bottom-style: solid;
    border: #FFFFFF;
    white-space: nowrap;
    text-align: end
}

table{
    border-collapse: collapse;
}

#rising tr,#falling tr{
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    color: white;
    font-size: 1.5rem;
}

#rising td,#falling td{
    white-space: nowrap;
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    color: #FFFFFF;
    font-size: 1.5rem;
    padding: 1.2rem;
    border-bottom:0.2rem solid #FFFFFF;
    width: 10rem;
}

.etfBanner{
    height: 2.5rem;
    width: 4rem;
    align-self: center;
}

/*--- StockPage ---*/

#stockPage .market_back{
    background-color: rgba(11, 21, 59, 0.75);
    border-radius: 2rem;
}

.graf #stock_graf{
    display: inline !important;
    width: auto !important;
    height: auto !important;
    max-height: 18rem
}

.graf *{
    border: none;
    border-radius: 1rem;
    background-color: rgba(0,0,0,0.7);
}

.graf #relstrenght_graf{
    width: 97%;
    height: 20rem;
    margin: 1rem;
    margin-bottom: 2rem;
    background-color: black;
}

.stockInfo {
    display: flex;
}

div.slide.hidden #stockActions{
    display:none
}

div.slide.visible #stockActions{
    max-width: 100rem;
    width: 100%;
    display: flex;  
    gap: 1rem;
    margin-left: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-right: 25rem;
}

div.slide.visible .buySell{
    background-color: #0A205A;
    opacity: 0.8; 
    border-radius: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    max-width: 10rem;
    padding: 0.5rem;
}

div.slide.visible #n_actionsToBuy , #n_actionsToSell{
    max-height: 2rem;
    height: 100%;
    max-width: 7rem;
    width: 100%;
    background-color:rgba(11, 21, 59, 0.75);
    color: white;
    border: none;
    border-radius: 0.8rem;
    margin: 0.5rem;
    flex: 1;
}

div.slide.visible #buyButton, #sellButton{
    max-width: 7rem;
    width: 100%;
    max-height: 2rem;
    height: 100%;
    background: none;
    color: white;
    border: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin: 0.5rem;
    flex: 1;
    cursor: pointer;
}

div.slide.visible #stockActions .buySell {
    max-width: 15rem;
}

div.slide.visible #all_in, #infoButton {
    background-color: #0A205A;
    color: white;
    width: 7rem;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.5rem;
    border: none;
    border-radius: 1rem;
    opacity: 0.8;
}

div.slide.visible #sell_all{
    background-color: #0A205A;
    color: white;
    width: 11rem;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.5rem;
    border: none;
    border-radius: 1rem;
    opacity: 0.8;
}

#infoButton {
    margin-left: auto;
    margin-right: 2rem;
}

/*--- Sidepannel ---*/

#infoPanel, .sidepanel {
    overflow-y: auto;
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background-color: rgba(11, 21, 59, 0.85);
    overflow-x: hidden;
    transition: width 0.5s ease;
    color: white;
    font-family: 'noto sans', sans-serif;
}

#infoPanel.visible {
    padding: 1rem;
    width: 20rem;
    opacity: 0.8;
    visibility: visible;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 999;
}

#overlay.visible {
    visibility: visible;
    opacity: 1;
}

#infoPanel {
    z-index: 1000;
}

#companyProfile {
    margin: 1rem;
    display: block;
    width: 25.5rem;
    max-height: 10rem;
    overflow-y: auto;
    background-color: rgba(15, 27, 73, 0.755);
    border: none;
    border-radius: 1rem;
    padding: 1.2rem;
    font-family: 'noto sans', sans-serif;
    font-size: 1.2rem;
}

#companyProfile::-webkit-scrollbar{
    width: 0.8rem;
}

#companyProfile::-webkit-scrollbar-thumb{
    background-color: rgba(255,255,255,0.3);
    border-radius: 0.5rem;
}

#companyProfile::-webkit-scrollbar-track{
    background-color: rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

.header {
    display: block;
    font-family: 'noto sans', sans-serif;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 1rem;
    margin-left: 2rem;
}

#descHeader{
    margin-top: 14rem;
}

#components{
    flex-direction: row; 
    margin: 1rem;
    width: 26rem;
    height: fit-content;
    background-color: rgba(15, 27, 73, 0.755);
    border-radius: 1rem;
    padding: 1rem;
    overflow-x: auto;
    gap: 2rem;
}

#miscellaneus{
    align-items: center;
    margin: 1rem;
    width: 26rem;
    height: fit-content;
    background-color: rgba(15, 27, 73, 0.755);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    gap: 2rem;
}

#composition{
    overflow-x: auto;
    flex-direction: row;
    gap: 2rem;

}

#composition::-webkit-scrollbar {
    width: 0.8rem;
}
#composition::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.3);
    border-radius: 0.5rem;
}
#composition::-webkit-scrollbar-track {
    background-color: rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

#stockName{
     white-space: nowrap;
}

.spec{
    width: 7rem;
    height: fit-content;
    border: none;
    border-radius: 1rem;
    background-color: rgba(36, 85, 159, 0.838);
    text-align: center;
    font-family: 'noto sans', sans-serif;
    padding: 0.6rem;
}

.innerSpec{
    white-space: nowrap;
    width: 84%;
    height: fit-content;
    background-color: #0e1a48d5;
    border: none;
    border-radius: 1rem;
    padding: 0.5rem;
    margin-top: 0.3rem;
    text-align: center;
    font-family: 'noto sans', sans-serif;
}

#commissions,#Aratings{
    align-items: center;
    background-color: rgba(15, 27, 73, 0.755);
    border: none;
    border-radius: 1rem;
    margin: 1rem;
    height: fit-content;
    width: 23.5rem;
    display: flex;
    padding: 0.7rem;
    padding-left: 4rem;
    gap: 4rem;
}


#krolik,#f_q{
    font-family: 'Xolonium', sans-serif;
}
/*--- profilePage ---*/

div.slide.hidden #portfolio{
    display:none;
}
div.slide.visible #portfolio {
    display: flex;
    overflow-y: auto;
    overflow-x: hidden;
    flex-direction: column;
    transform: none;
    position: relative;
    padding: 1.25rem;
    margin-left: 3rem;
    margin-right: 3rem;
    max-width: 90%;
    height: 35vh;
}


#portfolio h2{
    font-family: 'Xolonium', sans-serif;
    font-weight: bold;
    color: white;
    font-size: 2rem;
    margin: 1rem;
}
#portfolioContent tr{
    font-family: 'Noto sans';
    font-weight: bold;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
}

#portfolioContent td{
    text-align: center;
    font-family: 'Noto sans';
    font-weight: bold;
    color: white;
    padding: 1rem;
    border-bottom:3px solid #FFFFFF;
    width: 10rem;
}

#portfolioContent tr:last-child td, #rising tr:last-child td, #falling tr:last-child td{
    border-bottom: none;
}

#portfolioContent th{
    font-family: 'Noto sans';
    font-weight: bold;
    color: white;
    padding: 1rem;
    width: 12rem;
}

.backHome{
    position: absolute;
    top:0; 
    left:0;
    background: #0A205A;
    width: 5rem;
    height: 3rem;
    border: none;
    border-radius: 0.7rem;
    padding: 0.5rem;
    margin: 0.5rem;
    z-index: 99999;
}
div.slide.hidden .profile_back {
    display: none;
}

div.slide.visible .profile_back{
    width: calc(100% - 6rem); /* elimina larghezza fissa */
    max-width: 85rem; /* se vuoi un limite massimo */
    margin: 0 auto; /* centra il contenitore */
    height: 40%;
    background-color: rgba(11, 21, 59, 0.75);
    border-radius: 2rem;
    z-index: 0;
}

div.slide.visible #profile {
    display: flex;
    position: relative;
    top: 0.5rem;
    transform: none;
    padding: 1.25rem;
    margin-left: 3rem; margin-right: 3rem;
    margin-top: 2rem; margin-bottom: 2rem;
    height: 35vh;
    max-width: 90%;
}

div.slide.visible #accessibility_profile{
    position: absolute;
    top: 4%;
    left: 70%;
    bottom: 78%;
    right: 2%;
    transform: none;
    height: auto;
    padding: 1.25rem;
    z-index: 9999;
}

div.slide.visible #logoProfile{
    width: 100%;
    height: auto;
    top: 2%;
    margin-left: 2rem;
}

div.slide.hidden #logoProfile{
    display: none;
}

.profile_back #riquadroInterno{
    position: absolute;
    left: 5%;
    right: 20%;
    top: 10%;
    bottom: 10%;
    width: 90%;
    height: 80%;
    border: none;
    border-radius: 1rem;
    background:rgba(21, 145, 234, 0.1);
}
#riquadroInterno img{
    width: auto;
    height: 90%;
    margin:1rem;
}

div.slide.visible #profileInfo{
    position: absolute;
    top: 0;
    left: 20rem;
    font-family: 'Xolonium', sans-serif;
    color: white;
    font-size: 1.5rem;
}

#logoutButton{
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background-image: url('pics/logout.webp');
    background-size: contain;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    z-index: 9999;
    transition: ease-in 0.2s;
    filter: brightness(0.7);
}

#logoutButton:hover{
    filter: brightness(1);
    transform: scale(1.1);
    transition: ease-in 0.2s;
    box-shadow: 0 0 1rem 0 rgba(185, 4, 142, 0.5);
}

/*--- MEDIA QUERIES ---*/

@media screen and (max-width:45rem) {
    #landingPageText{
        font-size: 0.6rem;
    }

    /*--- LoginPage ---*/

    div.slide.visible #log_reg_back {
        transform: translate(-50%, -50%);
        top:55%;
        width: 85%;
        max-width: none;
        margin: 0;
    }

    #loginError{
        position: relative !important;
        top: 0.2rem;
        height: 2rem;
        margin-bottom: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
        font-size: 0.6rem;
    }

    .buttons_log_reg {
        position: relative !important;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        margin-top: 0;
        width: 100%;
        font-size: 0.7rem;
    }
  
    .buttons_log_reg button {
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        top: 0.1rem !important;
        /* scale: 0.8;  RIMOSSO */
    }

    input.log_reg_input{
        position: relative !important;
        font-size: 1.0em;
        height: 100%;
        width: 90%;
        border: none;
        padding: 2%;
        margin-top: 6%;
    }

    /*--- Register Page ---*/

    div.slide.visible #registerPage_back{
        transform: translate(-50%, -50%);
        top:60%;
        width: 85%;
        max-width: none;
        margin: 0;
    }

    .register_buttons button {
        font-size: 0.7rem;
    }

    .register_buttons {
        position: relative !important;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        margin-top: 0;
        width: 100%;
        font-size: 0.7rem;
    }
  
    .register_buttons button {
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        top: 0.1rem !important;
        /* scale: 0.8;  RIMOSSO */
    }

    .register_input{
        position: relative !important;
        font-size: 1.0em;
        height: 100%;
        width: 90%;
        border: none;
        padding: 2%;
        margin-top: 6%;
    }

    .errorText{
        margin: 0 0 0 0;
        padding: 0;
        font-size: 1rem;
    }

    .bg{
        width: 100%;
        height: 100%;
    }

    div.slide.visible #saves_back {
        width: 18rem;
        padding: 1rem;
    }

    /*--- Profile Page ---*/
    div.slide.visible #profile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        margin: 1rem auto;
        height: auto;
        max-width: 95%;
    }

    div.slide.visible .profile_back {
        width: 90%;
        margin: 1rem auto;
        height: auto;
        padding: 1rem;
        background-color: rgba(11, 21, 59, 0.85);
        border-radius: 1.5rem;
    }

    div.slide.visible #accessibility_profile {
        position: fixed;
        top: 2rem;
        left: 2rem;
        width: 100%;
        margin: 1rem auto;
        padding: 1rem;
        text-align: center;
    }

    div.slide.visible #logoProfile {
        width: 80%;
        height: auto;
        margin: 1rem auto;
    }

    div.slide.visible #profileInfo {
        position: relative;
        top: auto;
        left: auto;
        margin: 1rem auto;
        text-align: center;
        font-size: 1.2rem;
    }

    .profile_back #riquadroInterno {
        position: relative;
        width: 100%;
        height: auto;
        margin: 1rem auto;
        padding: 1rem;
        background: rgba(21, 145, 234, 0.1);
        border-radius: 1rem;
    }

    #riquadroInterno img {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    #logoutButton {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 1rem auto;
        width: 3rem;
        height: 3rem;
    }

    /*--- loading Responsive ---*/

    #loading h2{
        font-size: 1.5rem;
        text-align: center;
    }
    /*--- MarketHomePage---*/
    .accessibility{
        position: relative;
    }
    .graf {
        width: 100%;
        height: auto;
        margin: 1rem auto;
        margin-top: 1rem;
        margin-left: auto;
    }

    .graf #bestStock_graf {
        width: 100% !important;
        height: auto !important;
        max-height: none;
        display: block !important;
    }

    .graf #stock_graf{
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none;
    }

    div.slide.visible #rising_stocks, div.slide.visible #declining_stocks{
        overflow-x: auto;
        width: auto;
    }
    
}

/*--- Market Home Responsive ---*/
@media (max-width: 75rem) {
    div.slide.visible .market_back {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    div.slide.visible #best_stock, 
    div.slide.visible #singleStock {
        height: auto;
        width: 95%;
    }

    div.slide.visible #rises_and_falls,
    div.slide.visible #rises_falls {
        flex-direction: column;
        gap: 1rem;
    }
}
@media (max-width: 48rem) {
    div.slide.visible #best_stock, 
    div.slide.visible #singleStock {
        margin: 1rem auto;
        width: 100%;
        padding: 1rem;
    }
    
    #rising_stocks h3, 
    #declining_stocks h3, 
    #relativeStrenght h3 {
        font-size: 1.8rem;
    }
    
    .time_buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .time_buttons button {
        width: 3.5rem;
        height: 1.8rem;
        font-size: 0.9rem;
        margin: 0.5rem;
    }

    #rising,#falling{
        width: 100%;
    }
    #rising tr,#falling tr{
        font-size: 1.3rem;
    }
    #rising td,#falling td{
        font-size: 1rem;
        padding: 0.5rem;
        width: 7rem;
    }
    
}
@media (max-width: 30rem) {
    #logoHome {
        width: 18rem;
    }
    
    #my_stocks {
        width: 8rem;
        height: 1.8rem;
        font-size: 0.9rem;
    }

    div.slide.visible #stockActions{
        margin-right: 1rem;

    }
    
    .bestStock_value h1, 
    .bestStock_percentage h1 {
        font-size: 1.5rem;
    }
    
    div.slide.visible #rises_falls {
        flex-direction: column;
    }

    #rising,#falling{
        width: 100%;
        margin-top: 1rem;
        margin-left: 0rem;
    }
    #rising tr,#falling tr{
        font-size: 1rem;
    }
    #rising td,#falling td{
        font-size: 0.7rem;
        padding: 0.4rem;
        width: 5rem;
    }
}

