/* Contains styling for major common componenets such as headers, footers, side-bars, etc. */


/* OVERALL */

:root {
    --extra-margin-int: calc(50% - 725px);
    --extra-margin: clamp(0px, var(--extra-margin-int), var(--extra-margin-int));
    /* Creates variables for the margin to add at the side of the page.  */
    /* 50% is half the width of the page*/
    /* 725px is half the value of main-content max-width (1000px) plus nav-bar-spacer width (250 Px)*/

    --dark-blue: #011A53;
    --background-blue: #EBF1FF;
    --off-white: #F5F5F5;
    --mid-blue: #6C8BD4;
    --mild-blue: #D7E3FF;
    --light-blue: #D7E3FF;
    --green: #27F59C;
    --red: #FF5C3F;
    --amber: #F0E69A;
    --green-text: #199D64;
}


html {
    font-family: "Urbanist", sans-serif;
    background-color: var(--off-white);
    width: 100%;
    margin: 0px;
    font-size:14px;
}

#company-name h1{
    font-size: 1.5em;
}

@media (min-width: 800px) and (max-width: 1200px) {
    html {
        font-size: 12px;
    }

    #company-name h1 {
        font-size: 1.75em;
    }
}

@media (max-width: 799px) {
    html {
        font-size: 11px;
    }
    #company-name h1 {
        font-size: 1.75em;
    }
}


body {
    background-color: var(--background-blue);
    width: 100%;
    margin: 0;
}

p, h1, a, label, input, button {
    margin:0;
    letter-spacing: 1px;
    color: var(--dark-blue);
}

p, a, label, input, button {
    font-size: 1.2rem;
}

.white-font {
    color: var(--off-white);
}

a {
    text-decoration: none;
}

h2 {
    margin: 0 0 10px 0;
    padding: 0;
    color: var(--dark-blue);
    /* font-size: 1.3rem; */
}


h4 {
    margin: 0 0 10px 0;
    padding: 0;
    color: var(--dark-blue);
    font-size: 1.3rem;
}

.standard-text {
    margin: 0;
    letter-spacing: 1px;
    color: var(--dark-blue);
    font-size: 1.2rem;
}

/* Page Structure */

#main-page {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin: 0;
}

#nav-bar-spacer {
    background-color: var(--background-blue);
    width: 250px;
    min-height: 200px;
    position: relative;
    z-index: 0;
    margin: 0;
}

#main-content {
    background-color: var(--background-blue);
    width: calc(100% - 250px);
    min-height: calc(100vh - 200px);
    position: relative;
    max-width: 1200px;
}

@media (min-width:624px) and (max-width:899px) {
    #main-content {
        width: calc(100vw - 100px);
    }
}

@media (max-width:624px) {
    #main-content {
        width: 100vw;
    }
}


.side-padding {
    background-color: var(--background-blue);
    width: var(--extra-margin);
    min-width: 0;
    min-height: 200px;
    position: relative;
    z-index: 0;
    margin: 0;
}


/* Top Nav Bar */

#top-nav-bar {
    width: 100%;
    height: 70px;
    background-color: var(--dark-blue);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    margin: 0;
}

#company-name {
    margin-left: calc(var(--extra-margin) + 50px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    color: var(--off-white);
    text-decoration: none;
}


#logo {
    height: 30px;
}


/* Style the search box */
#search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 400px;
    max-width: 90%;
    /* margin: 0 50px; */
}



@media (max-width:1200px) and (min-width:1000px) {
    #search-bar {
        width: 300px;
    }
}

@media (max-width:1000px) and (min-width:870px) { 
    #search-bar {
        width: 20%;
    }
}

@media (max-width:870px) and (min-width:625px) { 
    #search-bar {
        width: 30%;
    }
}



#stock-search {
    width: 100%;
    font-size: 1.2rem;
    padding: 5px 10px;
    border: 1px solid var(--off-white);
    height: 20px;
    border-radius: 10px;
    background-color: var(--off-white);
    color: var(--dark-blue);
  }

.results {
    position: absolute;
    top: 53px;
    left: 0;
    width: 100%;
    /* min-width:300px; */
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--dark-blue);
    background-color: var(--off-white);
    z-index: 1000;
    border-radius: 10px;
    display: none; /* Hidden by default */
    color: var(--dark-blue);
}

.result-item {
    padding: 8px;
    cursor: pointer;
}

.result-item:hover {
    background-color: var(--light-blue);
}



/* Right header items */
.right-header-menu {
    display: flex;
    gap: 25px;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.header-menu {
    text-decoration: none;
}

.header-menu-font:hover {
    color:var(--mid-blue);
}

#account-logo {
    font-size: 30px;
    color: var(--off-white);
}

#account-logo:hover {
    color: var(--mid-blue);
}

/* Formatting for header login/logout items */
.login-menu-item {
    /* color:var(--green-text) !important; */
    font-weight: bold;
}



/* Select active item in header */

.header-menu.active{
    font-weight: bolder;
    font-size: 1.4rem;
    color: var(--off-white);
}

.header-menu.active > p:hover{
    color: var(--off-white);
    cursor: default;
}


/* Login Button */

.button {
    color: var(--off-white);
    padding: 8px 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.2rem;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    background-color: var(--off-white); 
    color: var(--dark-blue); 
    border: 2px solid var(--green);
    border-radius: 8px;
    font-weight: bold;
}
  
.button:hover {
    background-color: var(--green);
}


/* BURGER MENU */

.burger-menu-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: calc(var(--extra-margin) + 50px);
}



.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
}

.burger-menu span {
    display: block;
    height: 4px;
    background-color: var(--off-white);
    border-radius: 2px;
}

.collapsed-menu {
    display: block;
    flex-direction: column;
    background-color: var(--off-white);
    position: fixed;
    top: 53px;
    right: calc(var(--extra-margin) + 50px);
    width: 150px;
    border-radius: 10px;
    border: 1px solid var(--dark-blue);
    padding: 10px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* Disable interaction when not visible */
    font-size: 1.2em;
}

.collapsed-menu.active {
    display: flex;
    opacity: 1;
    pointer-events: auto; /* Enable interaction when visible */
}

.collapsed-menu a {
    padding: 10px;
    text-decoration: none;
    color: var(--dark-blue);
    display: block;
    width: 90%;
    border-radius: 5px;
}

.collapsed-menu a:hover {
    background-color: var(--mild-blue);
}

/* Style the hr element */
.collapsed-menu hr {
    border: none; /* Remove default border */
    height: 1px; /* Height of the line */
    background-color: var(--dark-blue); /* Color of the line */
    width: 100%; /* Full width */
    margin: 10px 0; /* Add some space above and below */
}

/* Media query for screens below 850px */
@media (max-width: 870px) {
    .right-header-menu {
        display: none;
    }
/* 
    .collapsed-menu {
        flex-direction: column;
        top: 70px;
        right: 0;
        width: 200px;
        border-radius: 0 0 5px 5px;
    } */

    /* .burger-menu-holder {
        margin-right: 20px;
    } */
}







/* Side Nav Bar */

#side-nav {
    background-color: var(--background-blue);
    display: flex;
    position: fixed;
    left: calc(var(--extra-margin) + 43px);
    top: 120px;
    z-index: 100;
    margin: 0;
    flex-direction: column;
}

.sidebar-item{
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    margin-bottom: 5px;
    border-radius: 10px;
    padding: 5px 10px 5px 7px;
    text-decoration: none;
    color: var(--dark-blue);
    flex-wrap: nowrap;
}

.sidebar-item:hover {
    background-color: var(--mid-blue);
}

/* Select active item in side-nav-bar */
.sidebar-item.active, .sidebar-item.active > span, .sidebar-item.active > p {
    background-color: var(--dark-blue);
    color: var(--off-white);
    border-color: var(--dark-blue);
}

.sidebar-item.active > .sidebar-icon {
    fill: var(--off-white);
}

.sidebar-icon {
    fill: var(--dark-blue);
    height: 24px;
    width: 24px;
}

.sidebar-item.active, .sidebar-item.active>span:hover, .sidebar-item.active>p:hover {
    background-color: var(--dark-blue);
    color: var(--off-white);
}



/* SIDE NAV COLLAPSE */
@media (min-width:625px) and (max-width:899px) {
    #side-nav {
        display: none;
    }

    #nav-bar-spacer {
        width:50px;
    }
}

/* SIDE NAV COLLAPSE */
@media (max-width:624px) {
    #side-nav {
        display: none;
    }

    #nav-bar-spacer {
        width:0px;
    }
}


/* TOP NAV BAR APPEAR */

#small-screen-nav-bar, #small-screen-nav-bar a {
    display: none;
}

@media (min-width: 625px) and (max-width:899px) {
    #small-screen-nav-bar {
        width: calc(100% - 100px);
        display: flex;
        background-color: var(--background-blue);
        position: relative;
        top: 0px;
        left: 0px;
        z-index: 50;
        padding: 80px 50px 10px 50px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #small-screen-nav-bar a {
        display: flex;
        width: 155px;
    }

    .sidebar-item {
        border-color: var(--mid-blue);
        border-width: 1px;
        border-style: double;
    }

    .sidebar-item.active {
        border-color: var(--dark-blue);
    }

}


/* Small Screen Nav Bar (Horizontal Scroll) */
@media (max-width: 624px) {
    #small-screen-nav-bar {
        width: 100%;
        display: flex;
        background-color: var(--background-blue);
        position: relative;
        top: 0px;
        left: 0px;
        z-index: 50;
        padding: 60px 25px 10px 25px;
        overflow-x: auto;  /* Enables horizontal scrolling */
        white-space: nowrap;  /* Prevents wrapping of buttons */
        flex-direction: row;
        justify-content: flex-start;
        gap: 5px;  /* Adds spacing between buttons */
        box-sizing: border-box; 
    }

    #small-screen-nav-bar::-webkit-scrollbar {
        display: none;  /* Hide scrollbar for WebKit browsers */
    }

    /* Each button (or link) in the scrollable nav */
    #small-screen-nav-bar a {
        display: inline-flex;
        width: auto;  /* Set auto width for buttons */
        padding: 3px 10px 3px 5px;
        border: 1px solid var(--mid-blue);
        border-radius: 10px;
        text-align: center;
        white-space: nowrap;
        /* margin-right: 5px; */
    }

    .sidebar-item {
        border: var(--mid-blue);
        border-width: 1px;
        /* border-style: single; */
        flex-shrink: 0;  /* Prevent buttons from shrinking */
    }

    .sidebar-item p {
        margin: 0;
    }

    .sidebar-item.active {
        border-color: var(--dark-blue);
    }

    #small-screen-nav-bar a.active {
        border-color: var(--dark-blue);        
    }
}




/* Footer */

#footer {
    position: relative;
    left: 0;
    width: 100%;
    background-color: var(--dark-blue);
    z-index: 100;
    margin: 0;
}

#footer-container {
    margin: 0 calc(var(--extra-margin) + 50px);
    padding-bottom: 25px;
    padding-top: 25px;
}





.footer-disclosure {
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: justify;
}

.footer-top-line {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-last-line{
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.footer-last-line-text{
    font-size: 1.1rem;
}

.footer-link-line {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.footer-links{
    margin-left: 5%;
    margin-right: 5%;
    font-size: 1.1rem;
}

.footer-links:hover{
    color: var(--mid-blue);
}

.footer-title{
    font-weight: bolder;
    font-size: 1.5rem;
}

.footer-title:hover{
    color: var(--mid-blue);
}


.external-links{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.footer-icon{
    height: 20px;
    margin-left: 40px;
}

.footer-left-bottom{
    vertical-align: middle
}

.footer-link-icon {
    height: 25px;
    width:40px;
    fill: var(--off-white);
    margin-left: 25px;
}

.footer-link-icon:hover {
    fill: var(--mid-blue);
}


/* Formatting for page descriptions and popups */

.follow-paragraph {
    margin-top: 13px;
}

.popup ul {
    color: var(--dark-blue);
    font-size: 1.15rem;
    margin-left: 25px;
    padding-left: 0;
    list-style-type: disc;
}

.popup li {
    margin-bottom: 5px;
}



/* Modal container (hidden by default) */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Stay on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(1, 26, 83, 0.5); /* Black with opacity */
}

/* Modal content */
.modal-content {
    position: relative;
    background-color: var(--off-white);
    margin: 20% auto;
    padding: 20px;
    border-radius: 10px;
    width: 50%; /* Width of the modal */
    text-align: center;
}

@media (max-width:550px) {
    .modal-content {
        width: 70%; /* Width of the modal */
        margin-top: 35%;
    }
}

/* Close button */
.close {
    position: absolute;
    color: var(--mid-blue);
    top: 0px;
    right: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}



/* Pop up if user not loggedin  */
#loginPromptModal p {
    margin-bottom: 15px;
    text-align: left;
}

#loginPromptModal h2 {
    padding: 10px 0;
}

.login-prompt {
    /* display: inline-block; */
    margin: 10px 30px;
}



/* Spinner on loading info */
.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

.spinner-circle {
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


@media (max-width:624px) {
    #top-nav-bar{
        height: 50px;
    }
    #search-bar {
        /* width: 30%; */
        margin: 0 15px;
        max-width: 200px;
        box-sizing: border-box; 
    }
    .burger-menu-holder {
        margin-right: 25px;
        margin-left:10px;
    }
    #company-name {
        margin-left: 25px;
        min-width: 180px;
        gap: 0px;
    }
    #company-name h1{
        font-size: 1.5em;
    }
    #logo {
        height: 25px;
        margin-right: 5px;
    }
    #footer-container {
        margin: 0px 25px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .footer-link-icon {
        height: 20px;
        width: 30px;
    }
    .burger-menu {
        width: 20px;
        height: 18px;
    }
    .burger-menu span {
        display: block;
        height: 3px;
        background-color: var(--off-white);
    }
    .footer-title {
        font-size: 1.3rem;
    }
}

@media (max-width:450px) {
    #company-name {
        min-width: 145px;
    }
    #company-name h1 {
        letter-spacing: -0.1px;
        font-size: 1.3em;
    }
    #Small-screen-nav-bar {
        padding-top: 60px;
    }
    .footer-link-icon {
        height: 20px;
        width:30px;
        margin-left: 15px;
    }
    .footer-title {
        font-size: 1.1rem;
    }
}


/* Styling for clickable links inside modal messages */
.show-link {
    color: #0070f3; /* Blue color for the link */
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.show-link:hover {
    /* color: #005bb5; Darker blue on hover */
    text-decoration: none; /* Optional: remove underline on hover */
}

.ticker-list-inline {
    /* margin-top: 8px; */
    /* gap: 5px; */
    margin-bottom: 10px;
}

.ticker-list-inline a {
    /* margin-top: 8px; */
    margin: 0 10px;
}