
html {
  font-size: 16px; /* 1rem = 16px */
}  

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /*background: linear-gradient(to right, #232526, #414345);*/
  background: white;
  color: #fff;
  overflow-x: hidden;
}

/* This section is used to hide element for mobile device */
.hide-on-mobile {
  display: block; /* default */
} 
.mobile .hide-on-mobile {
  display: none;
}   

.hidden {
  display: none;
}   

.visible {
  display: block;
}

.app-logo {
  width: 300px;
  height: 70px;
  margin: 20px;
}

.mobile .app-logo {
  width: 150px;
  height: 35px;
  margin: 5px;
}

/*
@media (max-width: 768px) {
  .app-logo {
    width: 150px;   /* 50% */
    height: 35px;   /* 50% */
  }
}
*/

.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 20px;
  color: #ccc;
}

/* menu buttons for accounts container */
.menu-button {
    padding: 8px 16px;
    border: 0px;
    font-size: 16px;
    font-weight: bold;
    background: transparent;
    color: navy;
    cursor: pointer;
} 
.menu-button:hover {
    background: transparent;
    text-decoration: underline;
    color: green;
}
.menu-button.active {
    text-decoration: underline;
    background: transparent;
    color: green;
}   

/* menu buttons for groups container */
.groups-button {
    padding: 8px 16px;
    border: 0px; 
    font-size: 16px;
    font-weight: bold;
    background: transparent;
    color: navy;
    cursor: pointer;
}
.groups-button:hover {
    background: transparent;
    text-decoration: underline;
    color: green;             
}   
.groups-button.active {
    text-decoration: underline;
    background: transparent;
    color: green;
}   

/* Home elements sections */
.home-container {
  margin-left: 20px;
  max-width: 1100px;
  color: black;
  font-size: 14px;
} 
  
.home-container p {
  margin-left: 30px;
  max-width: 1000px;
}
  
.home-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.home-card {
    background: #111111; /* Ink Black */
    border-radius: 12px;
    border: 1px solid grey;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 400px;
    cursor: pointer;
}
.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.home-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    /*color: #1E90FF;  DodgerBlue */
    color: lightgreen;
}
.home-card p {
    font-size: 14px;
    color: white;
    text-align: left;
    margin-left: 0;
}

/* Style for the banner bar */
.banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: #111111; /* Ink Black */
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    z-index: 100;
}   
.mobile .banner {
    height: 80px;
}   
    
/* Style for the banner bar */
.banner-home {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: #111111; /* Ink Black */
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    z-index: 100;
}
.mobile .banner-home {
    height: 80px;
}

.banner-home p {
  font-size: 1rem;
  text-align: left;
  opacity: 0.9;
  margin-left: 110px;
  color: lightgreen;
  transform: translateY(-30px);
}

/* Date and time container and styling */
.banner-info-container {
    display: flex;
    flex-direction: row;
    background: #111111; /* Ink Black */
    align-items: flex-end; /* Align date and time to the right */
    font-size: 12px;
    gap: 10px;
    color: white;
    position: absolute;
    top: 10px;  /* Adjust vertical position */
    right: 50px;
    padding: 5px 5px;
    text-align: right;
}   
.mobile .banner-info-container {
    top: 10px;  /* Adjust vertical position */
    left: 300px;
}   

.username {
  font-weight: bold;
  font-size: 16px;
  color: white;
}   
.mobile .username {
  font-size: 12px;
}   

.logo-container {
    display: flex;
}  

.user-menu-button {
  background: transparent;
  display: flex;
  flex-direction: row;
  position: absolute;   
  font-size: 20px;
  color: #00d8ff;
  cursor: pointer;
  z-index: 2000;
} 

.user-menu {
  position: absolute;
  top: calc(100% + 20px); /* 20px below button */
  left: -50px;          /* to the left, including a 20px gap */
  background: white;
  border: 1px solid #ccc;
  padding: 5px 0;
  min-width: 200px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2100;
}
.user-menu a {
  display: block;       /* Display links as full-width block */
  padding: 6px 12px;     /* Vertical spacing between items */
  text-decoration: none;
  color: #333;
  font-size: 14px;
}
.user-menu a:hover {
  background-color: #f0f0f0;
}

#currentDate,
#localTime,
#localTemperature,
#localWeatherDescription {
    margin-bottom: 5px; /* Space between date, time, and temperature */
}   
    
.current-time {
  font-size: 14px;
  color: #ccc;
}

nav {
    background-color: #222;
    color: white;
    padding: 10px;
}

nav button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}   

/* Button to open Login form located on home page */
.login-buttons-row {            
    display: flex;
    margin-top: -30px;
    margin-left: 30px;
    font-size: 14px;
    gap: 30px;
    background: transparent;
} 
.mobile .login-buttons-row {            
    font-size: 12px;
    margin-top: 10px;
    margin-left: 10px;
} 

.login-form-button { 
    background: transparent;
    border: 0px;
    font-weight: bold;
    color: lightblue;
    cursor: pointer;
/*
    transform: translateY(-40px);
*/
    text-decoration: none;
} 
.login-form-button:hover {
    background: transparent;
    color: white;
} 


/* Login form elements */
.login-container {
    top: 20%; 
    left: 30%;
    margin-top: 20px;
    margin-left: 20px;
    background: white;
    width: 100%;
    height: 500px;
    color: black;
    font-size: 14px;
}   
    
.login-button { 
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 150px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 16px;
    font-weight: bold;
    color: grey;
    cursor: pointer;
}
.login-button:hover {
    background: transparent;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
    color: green;
}
  
.login-extra {
    font-size: 14px;
    color: black;
    margin-top: 20px;
}
.mobile .login-extra {
    font-size: 11px;
}

#content {
    background-color: white;
}

button {
    background-color: black;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}
button:hover {
    background-color: green;
}

.show-alert-container {
    position: fixed;
    left: 20%;
    top: 10%;
    border: 8px solid #ccc;
    border-radius: 10px;
    display: flex;
    background-color: white;
    min-width: 300px;
    max-width: 600px;
    min-height: 150px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    resize: both; /* Enables manual resizing */
}
.show-alert-container .content {
    font-size: 1rem;
    flex-direction: column;
    text-align: left;
    padding: 20px;
    color: black;
    white-space: pre-wrap;  /* Preserves newlines and wraps long text */
    overflow: auto;
}
.show-alert-container .footer {
    display: flex;
    justify-content: center;   /* horizontal centering */
    margin-top: 10px;
    margin-bottom: 15px;
    padding-top: 12px;
}
.show-alert-container .footer button {
    width: 120px;
    font-size: 1rem;
    font-weight: bold;
    background: black;
    color: white;
    border-radius: 8px;
}
.show-alert-container .footer button:hover {
    color: SkyBlue;
}

/* Help Button */
.help-modal {
    position: fixed;
    top: 10%; left: 10%;
    width: 50vw;
    height: 50vh;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    resize: both; /* Enables manual resizing */
    z-index: 9999; /* On top */
    overflow: auto;
}

.help-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    font-size: 14px;
}
.help-header, 
.help-footer {
    flex-shrink: 0;
    padding: 10px;
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
    color: black;
}
.help-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto; /* Allows scrolling */
}
.help-btn { 
    background-color: white;
    color: green;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}  
.help-btn:hover {
    background-color: #F0F8FF;
}
.help-close {    
    position: absolute; 
    top: 10px; 
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
}           
.help-close:hover {
    color: black;
}       

.models-content-container {
    position: fixed;
    width: 95%;
    bottom: 20px;              /* 🔑 THIS enables scrolling */
    top: 170px;
    overflow-y: auto;
}
#modelsContent {
    --drawer-width: 0px;
    margin-left: 0;
    margin-top: 10px;
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: margin-left;
} 
#modelsContent.shifted {
    margin-left: var(--drawer-width);
}

.screener-content-container {
    position: fixed;
    width: 90%;
    top: 170px;
}
#screenerContent {
    --drawer-width: 0px;
    margin-left: 0;
    margin-top: 70px;
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: margin-left;
} 
#screenerContent.shifted {
    margin-left: var(--drawer-width);
}
    
#screener-instructions {
    position: relative;
    display: inline-block;
    border: 2px solid black;
    border-radius: 5px;
    padding: 10px;
    margin-left: 20px;
    margin-bottom: 20px;
    width: 800px;
    height: 300px;
    overflow-y: auto;
    font-size: 12px;
    z-index: 900;
}
#screener-instructions .instructions {
    align-items: left;
    white-space: normal;     /* allow wrapping */
    word-wrap: break-word;   /* break long words if needed */
    overflow-wrap: break-word; /* modern wrapping */
    font-size: 12px;
}

/* Position the instructions near the help icon */
.help-container {
    position: relative;
    display: inline-block;
}

.confirm-modal {
    position: fixed;
    background-color: white;
    top: 20%;
    left: 20%;
    width: 400px;
    max-width: 90vw;
    border: 4px solid black;
    border-radius: 8px;
    z-index: 8000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    outline: 4px solid red;
}
.confirm-modal .content {
    white-space: normal;     /* allow wrapping */
    word-wrap: break-word;   /* break long words if needed */
    overflow-wrap: break-word; /* modern wrapping */
    font-size: 14px;
    padding: 20px;
    margin-bottom: 10px;
    background-color: white;
    color: black;
    font-size: 1rem;
/*
    margin-left: 20px;
    max-width: 90%
*/
} 
.confirm-modal .buttons {
    display: flex;
    justify-content: center;  /* center horizontally */
    gap: 15px;                /* space between buttons */
    margin-top: auto;         /* push container down */
    padding-top: 10px;
} 

.section-title {
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 4px;
  background-color: #e9ecef;  /* light gray bg */
  padding: 4px 8px;
  border-radius: 4px;
} 

.stock-card.alert-active .alert-icon {
  display: block;
}
  
.user-model-menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, max-content));
    gap: 20px;
    padding: 20px;
    justify-content: start; /* keeps grid items left-aligned */
}

.user-model-card1 {
    display: flex;
    background-color: lightgrey; 
    flex-direction: column;   
    justify-content: space-between; /* pushes buttons to bottom */
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    min-height: 200px; /* ensures consistent card height */
    position: relative;
    cursor: pointer;
}   
.user-model-card1:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}   

.user-model-card {
    display: flex;
    background-color: lightgrey;
    flex-direction: column;
    justify-content: space-between; /* pushes buttons to bottom */
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    min-height: 200px; /* ensures consistent card height */
    position: relative;
}
.user-model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
} 
.user-model-card.active {
    background-color: skyBlue;
} 

.model-menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, max-content));
    gap: 20px;
    padding: 20px;
}
.model-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    max-width: 350px; /* ensures consistent card height */
}   
/* Hover hint */ 
.model-card::after {             
  content: attr(data-tooltip);
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: #9ca3af;
  background: black;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 1;
}
.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.model-card.active {
    background-color: #EEE8AA; /*PaleGoldenrod*/
    box-shadow: 0 0 0 2px rgba(45, 92, 255, 0.6);
}

.model-card-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #343a40;
}
.model-card-desc {
    font-size: 12px;
    color: #6c757d;
}
.model-card-hidden {
    display: none;
}
.model-card-buttons {
    display: flex;
    justify-content: center;  /* center horizontally */
    gap: 15px;                /* space between buttons */
    margin-top: auto;         /* push container down */
    padding-top: 10px;
}
.model-btn {
    padding: 6px 6px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background-color: black;
    color: white;
}
.model-btn:hover {
    background-color: grey;
    color: black;
}

.toggle-menu-icon {
    display: relative;
    align-items: center;
    justify-content: center;

    margin-left: 20px;

    background: transparent;
    color: black;
    padding: 0;
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;

    transition: color 0.3s ease, transform 0.2s ease;
}

.icon-tooltip {
  position: relative;
  display: inline-flex;
}

.icon-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;

  left: 0;                 /* 🔑 anchor to right edge */
  margin-top: 6px;

  min-width: 300px;
  max-width: 600px;
  background: rgba(0, 0, 0, 0.85);
  color: #e5e7eb;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;

  white-space: normal;      /* allow wrapping */
  word-wrap: break-word;
  line-height: 1.35;
    
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(-2px);

  z-index: 9999;
}
/* Show on hover / keyboard focus */
.icon-tooltip:hover::after,
.icon-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.toggle-cards-icon {
    position: fixed;
    top: 20px;           /* 👈 position from the top */
    right: 20px;         /* stays in top-right */
    background-color: #343a40;
    color: white;
    padding: 12px 14px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 1000;
    font-size: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.toggle-cards-icon:hover {
    background-color: #495057;
    transform: scale(1.1);
}

.actions-menu-icon {
  position: absolute;
  font-size: 30px;
  margin-left: 8px;
  cursor: pointer;
  top: 20%;
  left: 40%;
}
.actions-menu-icon hidden {
  display: none;
}
.actions-menu-icon:hover {
  transform: scale(1.1);
}

.account-actions-menu {
  position: absolute;
  top: 20%;
  left: 45%;
  background: white;
  border: 1px solid #ccc;
  padding: 5px 0;
  width: 250px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-size: 12px; /* <-- Your font size here */
}
.account-actions-menu a {
  display: block;       /* Display links as full-width block */
  padding: 6px 12px;     /* Vertical spacing between items */
  text-decoration: none;
  color: #333;
  font-size: 12px;
}

.account-actions-menu a:hover {
  background-color: #f0f0f0;
}

.accounts-container {
  overflow-y: auto;
  gap: 10px;
  padding-top: 10px;
  padding-left: 20px;
  background: white;
}

.account-title {        
    font-size: 18px; 
    font-weight: bold; 
    color: black; 
    padding: 10px; 
} 

.symbol-item {
    padding: 6px;
    cursor: pointer;
}
.symbol-item:hover {
    background-color: #e6f0ff;
}

.stock-search {
    color: black;
}
.stock-search input.symbol-input[type="text"] {
    box-sizing: border-box;

    width: 500px;
    height: 35px;

    padding: 6px 10px;           /* overrides framework padding */
    font-size: 14px;
    line-height: 1.2;

    background-color: #000;
    color: #fff;

    border: 1px solid #444;
    border-radius: 4px;

    outline: none;

    text-decoration: none; /* Remove underline */
}
.stock-search input.symbol-input[type="text"]::placeholder {
    color: rgba(135, 206, 235, 1);
    opacity: 1;
}

.symbol-list { 
    background: lightblue;
    border: 1px solid #ddd;
    top: 200px;
    margin-left: 30px;
    width: 700px;
    height: 400px;
    overflow-y: auto;
    font-size: 11px;
    display: none;
    color: black;
    z-index: 9000;
} 
.mobile .symbol-list { 
  transform: translateY(20px);
}

.description {
    display: flex-wrap;
    width: 500px;
}

.name {
    display: flex;
    gap: 10px;
    align-items: center; /* Aligns items vertically */
    height: 30px;
}

.text-success {
  color: green;
}
.text-danger {
  color: red;
}

/* Ensure modal itself is solid white */
.modal2 {
  position: fixed;
  top: 20%;
  left: 10%;
  inset: 0;
  background: rgba(0,0,0,0.5);

  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;

  z-index: 9999 !important;
}

.modal {
  position: fixed;
  display: none; 
  top: 20%;
  left: 10%;
  z-index: 9999 !important;
}

.modal.open {
  display: block; 
}

.modal .content {
  /*background-color: #f9f9f9;  light background */
  background-color: #fff !important;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.modal-header {
  background-color: #343a40;  /* dark header */
  color: #fff;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.modal-content {
  position: relative;
  background-color: #fff !important;
}   

/* Darker overlay so background is blocked out */
.modal-backdrop {
  background-color: #000 !important;
  opacity: 0.7 !important;  /* adjust 0–1 as needed */
  z-index: 9998
} 
  
.modal-resize-handle {
  width: 15px;
  height: 15px;
  background: transparent;
  position: absolute;
  right: 2px;
  bottom: 2px;
  cursor: se-resize;
}

.modal-dialog {
  margin-left: 20%;
  margin-right: auto;
  resize: both;
  overflow: auto;
}

.modal-body {
  font-size: 0.9rem;
  padding-right: 2rem;  /* add right-side breathing room */
}

.data-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;    /* reduce vertical gap */
}

.data-item span {
  font-weight: 500;
}

.data-item span:first-child {
  margin-right: 8px;  /* reduce gap between label and value */
}

.hide-btn { 
    position: flex;
    text-align: center;
    margin-left: 300px;
    cursor: pointer;
    font-size: 14px;
    color: grey;
    padding: 10px;
}   
.hide-btn:hover {
    color: red;
} 


/* These elements are used for user feedback submission */

.feedback-thumbs {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feedback-thumbs p {
    font-size: 18px;
    font-weight: 600;
}
.thumb-up {
  font-size: 1.5rem;
  padding: .5rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.thumb-up:hover {
  background-color: transparent;
  transform: translateY(-4px);
}
.thumb-up.active {
  background-color: rgba(59, 130, 246, 0.12);
  box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.6),
        0 0 18px rgba(59, 130, 246, 0.8);
}
.thumb-down {
  font-size: 1.5rem;
  padding: .5rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.thumb-down:hover {
  background-color: transparent;
  transform: translateY(+4px);
}
.thumb-down.active {
  background-color: rgba(59, 130, 246, 0.12);
  box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.6),
        0 0 18px rgba(59, 130, 246, 0.8);
}   

.feedback-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.feedback-textarea::placeholder {
    color: rgba(180, 180, 180, 0.7);
}

.feedback-textarea:focus {
    outline: none;
    border-color: #4da3ff;
}

.star-rating {
    display: inline-flex;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.star {
    font-size: 22px;
    color: #555;
    transition: color 0.2s ease;
}
.star.active {
    color: gold;
}
.star-rating.error .star {
    color: #e11d48; /* red */
}
.star-rating.error::after {
    content: "Please select a rating";
    display: block;
    font-size: 12px;
    color: #e11d48;
    margin-top: 4px;
}

.textarea {
    rows: 4;
    font-size: 14px;
    min-width: 500px;
    margin-right: 20px;
}

/* Tabs container */
.nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);  /* subtle color and border */
}

/* Base tab styling */
.nav-tabs .nav-link {
  position: relative;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* Active tab */
.nav-tabs .nav-link.active {
  color: #e5e7eb;
  background: transparent;
}

/* Tab Hover */
.nav-tabs .nav-link:hover {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.04);
}

/* Active underline */
.nav-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: #3b82f6; /* primary accent */
  border-radius: 1px;
}

.note {
  white-space: normal;     /* allow wrapping */
  word-wrap: break-word;   /* break long words if needed */
  overflow-wrap: break-word; /* modern wrapping */
  font-size: 14px;
  font-style: italic;
  color: black;
} 

.page-title-container {
  display: flex;
  position: absolute;
  margin: 40px;
  font-size: 18px;
  min-width: 300px;
  color: #00d8ff;
}   
.page-title-container img {
  margin-right: 10px; /* add spacing between icon and page title */
}


/* History Toggle Button */
.history-button-container {
  position: relative;
  display: flex;
}

.historyToggle {
  margin-left: 10px;
  background-color: transparent;
  color: transparent;
  cursor: pointer;
  transform: translateY(-12px);
  border: 0px;
  z-index: 110;
}
.historyToggle:hover {
   background: transparent;
   color: grey;
}
.historyToggle i {
  color: white;
  font-size: 20px;
}

#historyAccordion {
  flex: 1 1 auto;
  overflow-y: auto; 
  margin-left: 10px;
  scrollbar-width: thin;
  font-size: 14px;
}   

/* Let the accordion area scroll while header stays fixed */
.historyHeader {
  flex: 0 0 auto;
  padding: 10px 10px;
  border-bottom: 2px solid #333;
}

/* The history drawer panel must allow internal scrolling */
#historyPanel {
    position: fixed;
    top: 120px;
    left: -300px; /* hidden by default */
    width: 300px;
    height: 100%;
    background: #202020;
    color: white;
    /*padding: 20px;*/
    box-sizing: border-box;
    overflow-y: auto;
    transition: left 0.3s ease;
    font-size: 12px;
    z-index: 1500;
}
#historyPanel.open {
    left: 0;
}
#historyPanel h2 {
    margin-top: 0;
    font-size: 14px;
}

/* Compact history items */
.history-item {
  background-color: #2c2c2c;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  font-size: 12px;  /* slightly smaller text */
  line-height: 1.2;
}

.history-item:hover {
  background-color: #3a3a3a;
  transform: scale(1.01);
}

/* Security name (title) */
.history-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px; /* minimal gap */
}

/* Event/source text */
.history-meta {
  color: #00bfff;
  font-size: 0.78rem;
}

/* Optional: tooltip style for timestamp hover (Chrome/Safari) */
.history-item[title] {
  cursor: help;
}

.timestamp {
  font-size: 0.8em;
  color: #aaa;
}

/* Dim overlay behind the drawer */
.historyOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 1040; /* below drawer (drawer z-index: 1050) */
}
.historyOverlay.show {
  opacity: 1;
  visibility: visible;
}

/* Collapse animation helpers */
.collapse:not(.show) { 
  display: none; 
}
.accordion-collapse {
  overflow: hidden;           /* required for height animation */
  transition: height 0.35s ease;
}
/* Remove Bootstrap default chevron; we use our own */
.accordion-button::after { display: none !important; }

/* Arrow rotation */
.arrow-icon { transition: transform .25s ease, color .25s ease; color:#ccc; }
.arrow-icon.rotate-down { transform: rotate(180deg); color:#00bfff; }
.accordion-button:hover .arrow-icon { color:#00bfff; }

.accordion-btn {
  margin-top: 20px;
  margin-left: 20px;
  margin-bottom: 10px;
  width: 100%;
  background-color: black;
  color: white;
  cursor: pointer;
  text-align: left;
  border: none;
  outline: none;
  transition: background-color 0.3s;
  font-size: 1rem;
  font-weight: bold;
}
.accordion-btn:hover {
  background-color: SkyBlue;
  color: black;
}
.panel {
  padding: 0 20px;
  background: transparent;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}
.panel p {
  color: black;
  margin: 2px 20px;
  font-size: 12px;
}

/* Autocomplete */
.autocomplete-list {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    max-height: 150px;
    overflow-y: auto;           
    width: 250px;
    z-index: 9999;
    display: none;
}
.autocomplete-item {
    padding: 6px;
    cursor: pointer;
}   
.autocomplete-item:hover {
    background-color: #e6f0ff;
}   

.gain {
  color: green;
  font-weight: bold;
}

.loss {
  color: red;
  font-weight: bold;
}

.top-container {         
  overflow-y: auto;
  width: 90%;
  height: 70%;
}   
.container-close {
  float: right;
  z-index: 10;
  background: white;
  border: 1px solid #ddd;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  color: black;
} 
.container-close:hover {
  background: red;
  color: black;
}   

.account-button {
    width: 150px;
    height: 30px;
    background-color: white;
    color: black;
    font-size: 12px;
    cursor: pointer;
    margin-top: 2px;
    margin-left: 2px;
} 
.account-button:hover {
    /*background-color: #777;*/
    background-color: SkyBlue;
    transform: translateY(-4px);
} 
.account-button.active {
    background-color: green;
    color: white;
} 

.dash-buttons-row {
  display: flex;
  margin-left: 30px;
  margin-bottom: 10px;
  overflow-x: auto;
  gap: 5px;

  max-height: 80px;
  opacity: 1;
  transform: translateY(-20px);

  transition:
    max-height 0.25s ease,
    opacity 0.2s ease,
    transform 0.25s ease;
}

.mobile .dash-buttons-row {
  transform: translateY(20px);
}

.dash-buttons-row.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

/* Toggle button */
.dash-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 14px;
}
.mobile .dash-toggle-btn {
  transform: translateY(40px);
}

.dash-toggle-btn i {
  transition: transform 0.25s ease;
}

.dash-toggle-btn.collapsed i {
  transform: rotate(180deg);
}

.dash-btn-icon {
    position: relative; /* important for tooltip positioning */
    border: none;
    cursor: pointer;
    font-size: 20px;
}
.dash-btn-icon:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
} 
.dash-btn-icon.active {
    background-color: rgba(59, 130, 246, 0.12);
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.6),
        0 0 18px rgba(59, 130, 246, 0.8);
}
.dash-btn-icon.active i {
    color: #60a5fa;
}

.help-icon {
    position: relative;
    display: flex;
    cursor: pointer;
    z-index: 8000;
    /*background-color: rgba(0, 123, 255, 0.6); /* Semi-transparent blue */
    background-color: rgba(0, 0, 0, 0.7); /* Black at 70% opacity */
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 16px; 
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    margin-left: 20px;
} 
  
.help-icon:hover .tooltip-text,
.help-icon:focus .tooltip-text {
  visibility: visible;
  opacity: 1;
} 

.tooltip-wrapper {
  position: relative;
  display: inline-block; /* or block, depending on layout */
}
.tooltip-wrapper .tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: black;
  color: white;
  text-align: left;
  padding: 4px 6px;
  border-radius: 4px;
  position: absolute;
  /*bottom: 100%; position above the input */
  top: 100%; /* position below the input */
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s ease-in-out;
  width: auto;                /* let it size to content up to max-width */
  white-space: normal;        /* allow normal wrapping */
  word-wrap: break-word;      /* wrap long words if needed */
  word-break: break-word;     /* ensure long words break to avoid overflow */
  font-size: 12px;
  min-width: 400px;           /* the maximum width of tooltip */
  z-index: 9000;
}
.tooltip-wrapper .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0,0,0,0.8) transparent transparent transparent;
}
.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper:active .tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* busy spinner */
.busy-container {
  display: flex;
  flex-direction: row;         /* Force horizontal layout */
  align-items: center;         /* Align text and spinner vertically */
  justify-content: center;     /* Center the group horizontally */
  gap: 10px;                   /* Spacing between text and spinner */
  margin: 10px;
  min-width: 50%;
}

.busy-text {
  font-size: 14px;
  font-weight: bold;
  color: #555;
  white-space: nowrap;         /* Prevent wrapping */
}

.busy-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  flex-shrink: 0;              /* Prevent shrinking */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.drawer-title {
   font-size: 1.2rem;
   font-weight: 500;
}

/* 
   Drawer Shell
   Purpose: container, background, positioning, animation, and dynamic drawer width 
*/

#drawer {
    position: fixed;
    left: 0;
    top: 210px;
    bottom: 0;

    width: var(--drawer-width, 500px);

    display: flex;
    flex-direction: column;

/*
    background-color: #111111; /* Ink Black */
    color: white;              /* default text color */
*/
    background-color: white;
    color: black;              /* default text color */
    font-size: 14px;

    box-shadow: 2px 0 14px rgba(0,0,0,0.25);
    z-index: 1000;

    transform: translateX(-100%);  /* Drawer initially hidden */
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;

    pointer-events: none;

    overflow: hidden;
}

#drawer.open {
    transform: translateX(0);
    pointer-events: auto;
}

#drawerContent {
/*
    flex: 1 1 auto;        
*/
    min-height: 0;
    height: 95%;
    overflow-y: auto;
    padding-left: 10px;
    text-align: left;
    scroll-behavior: smooth;
    scroll-gutter: stable;

    background-color: transparent;
    color: inherit;

    /* added this */
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);

    transition: opacity 0.2s ease, transform 0.2s ease;
}

#drawer.open #drawerContent {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#drawer.minimized #drawerContent {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12px);
}

#drawer .panel-body {          
    display: flex;
    flex-direction: column;
    gap: 10px;
}   

#drawer .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px;
  gap: 12px;
}

#drawer .panel-header h3 {
  margin: 5px;
  font-size: 1.2rem;
  font-weight: 600;
}

#drawer .panel-header .header-buttons {
  display: flex;
  align-items: left;
  gap: 10px;
}

#drawer .panel-header .header-buttons button {
  margin-left: 10px;
  padding: 0.5rem 1rem;

  border: 1px solid black;
  border-radius: 0.3rem;
  height: 35px;

  background: white;
  color: black;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

#drawer .panel-header .header-buttons button:hover {
  background: skyblue;
  color: white;
}

.panel-btn.icon-btn {
  position: relative;
  margin-top: 10px;
  padding: 6px;
  background: transparent;
  color: grey;
  border: none;
  cursor: pointer;
}
.panel-btn.icon-btn i {
  font-size: 32px;
  color: black;
  transition: color 0.15s ease;
}
.panel-btn.icon-btn:hover i {
  color: grey;
}
.panel-btn.icon-btn::after {
  /* Tooltip on hover */
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  background: #1e1e1e;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 100;
}
.panel-btn.icon-btn:hover::after {
  opacity: 1;
}

/* =========================
   Drawer Form Elements
   ========================= */
#drawer h1,
#drawer h2,
#drawer h3 {
    font-size: 18px;
    font-weight: 600;
}
#drawer ul {
    /* list-style-type: disc; */
    margin-left: 15px;
}
#drawer th {
    background-color: transparent;
    color: white;
    font-size: 16px;
    text-align: left;
}
#drawer code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
}
#drawer input,
#drawer select,
#drawer textarea {
    color: black;
    margin-bottom: 6px;
    border: 1px solid #334155;
    border-radius: 6px;
}
#drawer label {
    margin-top: 12px;
    font-weight: bold;
}
#drawer input {
    padding: 8px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 2px;
}
#drawer input:focus,
#drawer select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}
#drawer select[multiple][size] {
  min-height: 80px;
  height: auto;
}
#drawer .password-container {
    position: relative;
    display: flex;
    align-items: center;
}
#drawer .password-container input {
    display: flex;
}
#drawer .password-container .eye-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: .75rem;
    padding: .75rem;
}
#drawer .password-container .eye-button img {
    width: 24px;
    height: 24px;
}


/* Dashboard page content */
#mainContent {
    --drawer-width: 0px;
    margin-top: 180px;
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
/*
    will-change: margin-left;
*/
    overflow: auto;
}   
#mainContent.shifted {
    margin-left: var(--drawer-width);
}
.mobile #mainContent {
  margin-top: 120px;
  margin-left: -20px;
}

.transparent-button {
    font-size: 14px;
    cursor: pointer;
    color: black;
    background: transparent;
    border: 0px;
    margin-left: 20px;
}
.transparent-button:hover {
    background-color: black;
    color: white;
}

.query-header {
    margin-left:10px; 
    font-size:12px; 
    gap:10px;"
}
.query-header input {
    min-width: 300px;
}

.close-btn {
  position: absolute;

  display: flex;                 /* center content */
  align-items: center;
  justify-content: center;

  top: 5px;
  right: 5px;
  z-index: 2000; /* above backdrop and drawer (which are 100 and 101) */
  background: white;
  border: 1px solid #ddd;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  color: black;
}
.close-btn:hover {
  background: red;
  color: black;
}
.close-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

#drawer-close-btn {
  position: absolute;
  display: flex;
  top: 5px;
  right: 5px;
  z-index: 2000; /* above backdrop and drawer (which are 100 and 101) */
  border: 0;
  font-size: 18px;
  cursor: pointer;
  background: transparent;
  color: black;
}   
#drawer-close-btn:hover {
  color: grey;
}   

#drawer-resize-btn {
  position: absolute;
  display: flex;
  top: 5px;
  left: 5px;
  z-index: 2000; /* above backdrop and drawer (which are 100 and 101) */
  border: 0;
  font-size: 18px;
  cursor: pointer;
  background: transparent;
  color: black;
}   
#drawer-resize-btn:hover {
  color: grey;
}

.no-decoration {
    /* remove underline from url text */
    text-decoration: none;
}

.username-input {
    width: 350px;
}
.password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 350px;
}
.password-input {
    width: 100%;
    height: 38px;
    padding-right: 38px; /* space for the eye */
    padding-left: 10px;
    font-size: 14px;
    box-sizing: border-box;
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: black;
    font-size: 16px;
    user-select: none;
}
.toggle-password:hover {
    color: grey;
}

.form-header {
    margin: 20px;
}

.form-header .title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    padding-top: 10px;
    padding-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.form-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.form-header .header-buttons button {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid black;
    border-radius: 0.3rem;
    background: white;
    color: black;
    cursor: pointer;
    transition: background 0.3s ease;
}
.form-header .header-buttons button:hover {
    background: skyblue;
    color: white;
}

.form-container {
    position: fixed;
    display: none;
    flex-direction: column;
    min-width: 400px;
    top: 10%;
    left: 20%;
    padding: 20px;
    background: white;
    color: black;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    z-index: 3000;
}
.mobile .form-container {
    left: 5%;
}

.form-content {
    margin-left: 10px;
    background-color: transparent;
    color: black;
    flex-direction: column;
    font-size: 14px;
    display: flex;
    overflow-y: auto;
    text-align: left;
    resize: both;
}
.form-content .title {
    font-size: 14px;
    font-weight: bold;
    margin: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}   
.form-content h2,
.form-content h3,
.form-content h4,
.form-content h5 {
    margin-bottom: 20px;
    font-size: 1rem;
}
.mobile .form-content h3 {
    margin-bottom: 8px;
    font-size: 12px;
}
.form-content label {
    margin-top: 10px;
    font-weight: bold;
}
.mobile .form-content label {
    margin-top: 5px;
}
.form-content p {
    font-size: 14px;
}
.mobile .form-content p {
    font-size: 11px;
}
.form-content a {
    font-size: 14px;
    color: navy;
    font-weight: bold;
    text-decoration: none;
}
.mobile .form-content a {
    font-size: 11px;
}
.form-content a:hover {
    color: SkyBlue;
}
.form-content input {
    padding: 6px;
    height: 25px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 2px;
    margin-bottom: 10px;
}
.form-content input:focus,
.form-content select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}
.form-content select[multiple][size] {
  min-height: 80px;
  height: auto;
  width: 100%;
}
.mobile .form-content input {
    font-size: 11px;
    padding: 5px;
    height: 25px;
}

.form-buttons {
    display: flex;
    justify-content: center;  /* center horizontally */
    gap: 10px;                /* space between buttons */
    margin-bottom: 10px;
    width: 100%;
}
.form-buttons button {
  font-size: 1rem;
  min-width: 100px;
  height: 30px;
  background: white;
  color: black;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}
.form-buttons button:hover {
  background: skyblue;
  transform: translateY(-2px);
}
.mobile .form-buttons button {
  font-size: 12px;
  height: 25px;
}

.form-section {
    margin-top: 15px;
    border-top: 2px solid grey; /* divider */
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    width: 80%;
}

/* these elements are used in Screener page */
.form-instruction {
  white-space: normal;     /* allow wrapping */
  word-wrap: break-word;   /* break long words if needed */
  overflow-wrap: break-word; /* modern wrapping */
  font-size: 12px;
  font-style: italic;
  color: white;
}

.form-info {
  font-size: 12px;
  white-space: normal;     /* allow wrapping */
  word-wrap: break-word;   /* break long words if needed */
  overflow-wrap: break-word; /* modern wrapping */
  font-size: 12px;
}

.form-title {
    font-size: 18px;
    font-weight: bold;
    color:black;
    /*margin-top:15px;*/
    margin-left:15px;
}

.form-row {
    flex-direction: column;
    background-color: transparent;
    color: black;
    border-radius: 2px;
    display: flex;
    font-size: 1rem;
    width: 100%;
}
.form-row label {
    margin-top: 12px;
    font-weight: bold;
    font-size: 12px;
}
.form-row p {
    margin-top: 12px;
    font-size: 12px;
    font-weight: bold;
}
.form-row input,
.form-row select {
    padding: 6px;
    font-size: 12px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 2px;

}
.form-row select option {
    background-color: #fff;   /* native dropdown */
    color: #000;
}
.form-row input:focus,
.form-row select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}
.form-row textarea {
  padding: 6px;
  font-size: 12px;
  height: 96px;          /* approx 6 rows */
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

table {
  border-collapse: collapse;
}

th, td {
  padding: 10px 16px;  /* vertical | horizontal */
}

.page-container {                
    position: fixed;
    top: 200px;
    flex-direction: column;
    width: 600px;
    padding: 20px;
    background: white;
    color: black;
    font-size: 14px;
}   

.watchlist-accounts-container {                
    padding-bottom: 20px;
    background-color: black;
}
#watchlistContent {
    --drawer-width: 0px;
    margin-left: 0;           
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: margin-left;
} 
#watchlistContent.shifted {
    margin-left: var(--drawer-width);
}   

.watchlist-accounts-container .nodata {
    font-size: 1rem;
    padding-top: 50px;
    padding-left: 50px;
    color: white;
}
.watchlist-accounts-container .note {
    font-size: 12px;
    padding-top: 20px;
    padding-left: 20px;
    color: white;
}

.stock-card {
  position: relative;
  border-radius: 6px;
  padding: 12px 14px;
  background: white;
  border: 1px solid black;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;

}
.stock-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: grey;
  transform: translateY(-2px);
  color: white;
} 
/* Hover hint */ 
.stock-card::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: #9ca3af;
  background: black;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 1;
}   
/* Show hint on card hover */
.stock-card:hover:not(:has(.card-buttons:hover))::after {
  opacity: 1;
}
.stock-card.alert-active {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid #ff4444;
}
.alert-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  z-index: 2;
}
.alert-icon img {
  width: 24px;
  height: 24px;
}

/* Keep buttons in a row with spacing */
.card-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px; /* slight spacing between buttons */
  margin-top: 6px;
  pointer-events: auto;
}

/* Icon button */
.card-btn.icon-btn {
  position: relative;
  padding: 6px;
  background: transparent;
  color: grey;
  border: none;
  cursor: pointer;
}

/* Darker icon color */
.card-btn.icon-btn i {
  font-size: 20px;
  color: #8a9099;   /* darker, muted */
  transition: color 0.15s ease;
}
/* icon hover state */
.card-btn.icon-btn:hover i {
  color: #e5e7eb;
}

/* Tooltip on hover */
.card-btn.icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e1e;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 100;
}

.card-btn.icon-btn:hover::after {
  opacity: 1;
}

.card-title {              
    font-size: 12px;
    margin-bottom: 8px;
    color: black;
}

/* These CSS elements are used in Position page for rendering Portfolio Summary data */
.portfolio-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));

  column-gap: 16px;
  row-gap: 8px;

  /*margin-top: 15px;*/
  margin-bottom: 10px;
  margin-left: 20px; 
  max-width: 1000px;   /* 🔑 reduce width */
  padding-bottom: 10px;
  border-bottom: 1px solid lightgrey /* divider */
}

/* Auto-wrap DOWN as space decreases */
@media (max-width: 1200px) {
  .portfolio-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .portfolio-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .portfolio-summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-item {
  min-width: 0;
}

.summary-label {
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1px;
  line-height: 1.1;
}

.summary-value {
  font-size: 12px;
  color: black;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.summary-value.positive {
  color: #22c55e;
}

.summary-value.negative {
  color: #ef4444;
}

.tab-tooltip {
  position: relative;
}

/* Tab Tooltip elements */
.tab-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;              /* display tooltip under the tab */
  left: 0;                /* anchor to left edge of tab */
  transform: translateX(-50%);
  margin-top: 6px;
  margin-left: 60%;

  min-width: 300px;
  max-width: 600px;
  background: rgba(0, 0, 0, 0.85);
  color: #e5e7eb;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;

  white-space: normal;    /* allow wrapping */
  word-wrap: break-word;
  line-height: 1.35;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

/* Show on hover */
.tab-tooltip:hover::after,
.tab-tooltip:focus-visible::after {
  opacity: 1;
}

#portfolioContent {
    margin-left: 0;
    /*margin-top: 20px;*/
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: margin-left;
} 
#portfolioContent.shifted {
    margin-left: var(--drawer-width);
} 

#tradeGroupContent {
    margin-left: 0; 
    transition: margin-left 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: margin-left;
}   
#tradeGroupContent.shifted {
    margin-left: var(--drawer-width);
}   
#tradeGroupContent.shifmin {
    margin-right: var(--drawer-width);
}   

.stock-search-drawer {
    background-color: transparent;
}   
.stock-search-drawer input.symbol-input[type="text"] {
    box-sizing: border-box;

    width: 500px;
    height: 35px;
    
    padding: 6px 10px;           /* overrides framework padding */
    font-size: 14px;
    line-height: 1.2;

    background-color: white;
    color: black;
    
    border: 1px solid #444;
    border-radius: 4px;
    
    outline: none;
    
    text-decoration: none; /* Remove underline */
}
.stock-search-drawer input.symbol-input[type="text"]::placeholder {
    color: rgba(135, 206, 235, 1);
    opacity: 1; 
} 
.stock-search-drawer .symbol-list {
    background: DarkSlateGrey;
    border: 1px solid #ddd;
    margin: 10px;
    width: 700px;
    height: 400px;
    overflow-y: auto;
    font-size: 12px;
    display: none;
}


/* Used for Trade Group Member List */
.trade-group-table-container {
  background: #0f0f0f;
  border-radius: 4px;
  padding: 6px 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  /*max-width: 100%;*/
}

.trade-group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  line-height: 1.25;
  color: #e2e2e2;
}

/* Header */
.trade-group-table thead {
  background: transparent;
}

.trade-group-table th {
  padding: 6px 8px;
/*
  font-size: 9.5px;
*/
  border-bottom: 1px solid #222;
  white-space: nowrap;
  opacity: 0.85;
}

/* Body cells */
.trade-group-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #1b1b1b;
  white-space: nowrap;
}

.trade-group-table tbody tr:hover {
  background: rgba(76, 175, 80, 0.06);
}

/* Rank */
.rank-badge {
  min-width: 18px;
  padding: 2px 5px;
  font-size: 10px;
  border-radius: 4px;
  background: #222;
  text-align: center;
}

/* Name */
.member-link {
  color: #4caf50;
  cursor: pointer;
  font-weight: 600;
  max-width: 120px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-link:hover {
  text-decoration: underline;
}

/* Numeric alignment */
.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Gainers / Losers */
.positive {
  color: #66bb6a;
}

.negative {
  color: #ef5350;
}

.add-button {
   margin-left: 20px;
   font-size: 24px;
}
.add-button:hover {
   color: grey;
}


/* The following styling section is used for the Tool output drawer that is initiated from Dashboard */

.tool-card {
  margin-top: 30px;
  width: 95%;
  background: transparent;
  font-size: 11px;
  text-align: left;
  background-color: black;
  color: #e5e5e5; 
  padding: 10px 10px;
  font-family: Arial, sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
} 
  
.tool-footer {
  color: #555;
  font-size: 0.9em;        
  margin-top: 8px;
} 

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #111;
}
.compact-table td,
.compact-table th {
    font-size: 11px;
    color: #2b2b2b;
    text-align: left;
    line-height: .9;
}
.compact-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.compact-table.dark {
    color: #eaeaea;
}
.compact-table.dark th {
    font-size: 11px;
    background-color: #1c1c1c;
    color: white;
}
.compact-table.dark td {
    font-size: 11px;
    background-color: #1c1c1c;
    color: #9fe1b1;
}
.compact-table.dark tr:nth-child(even) td {
    /* subtle color change on even numbers */
    background-color: #151515;
}

.hist-tooltip {
  opacity: 1 !important;
  z-index: 2000 !important;
}
.hist-tooltip-inner {
  background-color: #2b2b2b; /* slightly lighter than drawer */
  color: #ffffff;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;
}
.hist-tooltip-arrow::before {
  border-top-color: #2b2b2b;
}

.floating-tooltip {
  position: fixed;
  background: black;
  color: #9ca3af;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;

  max-width: 240px;          /* 🔑 control width */

  white-space: normal;       /* 🔑 allow wrapping */
  word-wrap: break-word;     /* legacy support */
  overflow-wrap: anywhere;   /* modern wrapping */

  line-height: 1.35;
  text-align: left;

  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 9999;
}

.floating-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

