.overview-list {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.overview-list li {
  margin-bottom: 5px;
}

.positive {
    color: #086f08;
}

.negative {
    color: #a31e1e;
}

.chart-wrapper {
  position: relative;
  height: 500px;
  width: 100%;
}

#year-returns-chart {
  width: 100% !important;
  max-height: 500px !important;
}


.error-card {
    position: relative;
    background-color: #f56856;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0.75rem;
    padding-left: 4.25rem;
}

.error-card a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

.error-card a:hover {
    color: #fff;
}

.error-card h3 {
    color: #fff !important;
    margin: 0;
}

.error-card p {
    margin: 0;
}

.error-card::before {
    position: absolute;
    content: '!';
    display: block;
    background-color: #fff;
    color: #f56856;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0.75rem;
    height: 40px;
    width: 40px;
    align-self: center;
    text-align: center;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 100%;
}

.page-overview {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  max-height: 300px;
  overflow-y: auto;  
}

.page-overview h2 {
  font-size: 18px;    
  font-weight: 500;    
  border-bottom: 2px solid #e0e0e0; 
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.page-overview .overview-paragraph {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
  margin: 0; /* optional reset */
}

.return-bar, .yearly-return-bar {
  width: 100%; /* Ensures full width */
  max-width: calc(100% - 10px); /* Adjust for margins */
  height: 10px;
  position: relative;
  background-image: linear-gradient(to right, #e74c3c, #4CAF50); 
  border-radius: 25px;
  margin: 20px auto 40px auto; /* Centers bars properly */
  transition: background-color 0.5s ease-in-out;
  box-sizing: border-box; /* Ensures padding/margins don’t exceed container width */
}

.bar-info, .yearly-bar-info {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: -30px;
  width: 100%;
  font-weight: bold;

}

.bar-info span {
  position: relative;
  z-index: 2;
}

.bar-info .negative, .yearly-bar-info .negative {
  color: #a31e1e;
}

.bar-info .positive, .yearly-bar-info .positive {
  color: #086f08;
}

@media (max-width: 400px) {
  .bar-info,
  .yearly-bar-info {
    font-size: 12px;
  }
}

.marker, .yearly-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid #41145d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: transform 0.3s ease-in-out;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 350px; 
  width: 100%;
}

.search-bar input {
  max-width: 100%;
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0px 4px 10px rgba(39, 174, 96, 0.2);
}

/* Download Button */
#downloadExcel {
  background: none;
  border: 2px solid #0C7075;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  color: #0C7075;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

#downloadExcel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#downloadExcel i {
  margin-left: 8px;
}

/* Mobile & Tablet Responsive */
@media (max-width: 768px) {
  .controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .search-bar {
    flex: 1 1 auto;
    width: 70%;
  }

  #downloadExcel {
    flex: 0 0 auto;
  }

  .search-bar input {
    padding: 8px;
    font-size: 13px;
  }

  #downloadExcel {
    padding: 8px 14px;
    font-size: 13px;
  }
}
 
.table-container {
    overflow-x: auto;
    background-color: #fff;
    border-radius: 6px;
    padding: 10px;
    border: none;
}

.table-container .table {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    min-width: 1100px;
    border: none;
    border-collapse: separate; 
    border-spacing: 0;        
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.03);
}

.table-container table,
.table-container thead,
.table-container tbody {
    border: none !important;
}

.table-container th {
    color: #072E33;      
    font-weight: 600;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 2;
    border: none;
    border-bottom: 2px solid #0F969C;
    white-space: nowrap;
    cursor: pointer;
}

.table-container td:first-child {
    position: sticky;
    left: 0;
    background-color: #f7fdfa;
    font-weight: 600;
    z-index: 1;
    border-right: 1px solid #e2e8e7;
}

.table-container td {
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border-bottom: 1px solid #f1f1f1;
    white-space: nowrap;
}

.table-container tbody td:last-child {
    font-weight: 600;
    font-size: 14px;
    background-color: #f3faf9;
    color: #072E33; 
    border-right: none !important;
}


.table-container tr:hover td {
    background-color: #f9fcfb;
}


.table-container tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.table-container .positive {
    background-color: #f2fcf5;
    color: #0F3E1D;
    font-weight: 500;
}


.table-container .negative {
    background-color: #fcf4f4;
    color: #672828;
    font-weight: 500;
}

@media screen and (max-width: 1024px) {
    .table-container .table {
        min-width: 1000px;
    }
}

@media screen and (max-width: 768px) {
    .table-container {
        padding: 5px;
    }

    .table-container .table {
        min-width: 900px;
        font-size: 14px;
    }

    .table-container th,
    .table-container td {
        padding: 8px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .table-container .table {
        min-width: 800px;
        font-size: 13px;
    }

    .table-container th,
    .table-container td {
        padding: 6px;
        font-size: 13px;
    }
}

.return-container {
    max-width: 400px;
    margin: 30px auto;
    padding: 25px;
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.return-container h2 {
    color: #072E33;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .return-container,
    .average-table-container,
    .average-returns,
    .stock-returns-overview h2 {
      font-size: 18px;
    }

    .average-returns h3 {
      font-size: 16px;
    }
}

.label-value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.return-container label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    margin: 0;
}

#investmentValue, #yearValue {
    background: #e9f5ff;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: #0F7075;  
    margin: 0;
    line-height: 1;
}

.return-container input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    outline: none;
    margin: 15px 0 25px 0;
    position: relative;
    transition: background 0.3s;
}

.return-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 4px solid #0F7075; 
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(15, 150, 156, 0.3); 
    transition: transform 0.2s ease-in-out;
}

.return-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #fff;
    border: 4px solid #0F7075; /* updated */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(15, 150, 156, 0.3);
}

.return-container input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    background: linear-gradient(to right, #0F969C var(--progress), #e0e0e0 var(--progress)); /* updated */
    border-radius: 10px;
}

.return-container input[type="range"]::-moz-range-track {
    height: 10px;
    background: linear-gradient(to right, #0F969C var(--progress), #e0e0e0 var(--progress)); /* updated */
    border-radius: 10px;
}

.calc-note { margin-top: 8px; font-size: 0.95rem; color: #1a1d23; }
.calc-link {
  color: #083c71;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.calc-link:hover { text-decoration-thickness: 2px; opacity: 0.9; }
.calc-link:focus-visible { outline: 2px solid #083c71; outline-offset: 2px; border-radius: 4px; }


#finalValue {
    font-size: 28px;
    font-weight: 700;
    color: #0F7075; /* updated */
    padding: 15px;
    display: block;
    background: #e9f5ff;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.investment-note {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
}

.summary {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    background: #f4f7f9;
    padding: 15px;
    border-radius: 10px;
}

.summary div {
    text-align: center;
    flex: 1;
}

.summary p:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #0F7075; 
    margin: 0;
}

.summary p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.stock-price-returns {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 20px 24px;
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.stock-symbol {
  font-size: 24px;
  font-weight: 600;
  color: #072E33;
}

.wrapper-box h2.stock-symbol {
  margin: 0;
}

.stock-price {
  font-size: 24px;
  font-weight: 600;
  color: #136162;
}

.stock-datetime {
  font-size: 0.8rem;
  color: #666;
}

.stock-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.stock-change.positive {
  color: #4caf50;
}

.stock-change.negative {
  color: #e74c3c;
}

.stock-metrics {
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Always 3 columns */
  row-gap: 12px;
  column-gap: 20px;
}

.metric-label {
  font-size: 14px;
  color: #666;
}

.metric-value {
  font-size: 15px;
  color: #072E33;
  font-weight: 500;
}

/* Tablet & Mobile: Only adjust spacing & font sizes, not layout */
@media (max-width: 768px) {
  .stock-card {
    padding: 16px 18px;
    gap: 16px;
  }

  .stock-symbol {
    font-size: 22px;
  }

  .stock-price {
    font-size: 20px;
  }

  .stock-change {
    font-size: 14px;
  }

  .metric-label {
      font-size: 12px;
  }
  
  .metric-value {
    font-size: 14px;
  }
}

.average-returns {
  margin-top: 20px;
}

.average-returns h3 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #083c71;
  border-bottom: 2px solid #eee;
  padding-bottom: 6px;
}

.avg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.avg-item:last-child {
  border-bottom: none;
}

.avg-item p {
  margin: 0;
  font-weight: 600;
  color: #444;
}

.avg-item span {
  font-size: 16px;
  font-weight: bold;
}

.average-table-container {
    overflow-x: auto;
    background-color: #fff;
    border-radius: 6px;
    padding: 10px;
}

.highlighted-row-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    background-color: #fff;
    margin-top: 10px;
}

/* Clean and subtle headers */
.highlighted-row-table th {
    background-color: #ffffff;
    color: #555;
    font-weight: 500;
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #0F969C;
}

/* Highlighted single row */
.highlighted-row-table td {
    padding: 12px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    background-color: #fff;
    color: #0C5355;
    border-bottom: 1px solid #eaeaea;
}

/* Positive and Negative values */
.highlighted-row-table td.positive {
    background-color: #ebfdf2;
    color: #0d845f;
}

.highlighted-row-table td.negative {
    background-color: #fef0f0;
    color: #c0392b;
}


.random-link-section {
  padding: 40px 20px;
  background: #fff;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.random-link-heading {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: #0F7075;
  text-align: center;
}


.random-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.random-link-box {
  display: block;
  background: linear-gradient(135deg, #f9f9f9, #fdfdfd);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: #1a1d23;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #e0e0e0;
}

.random-link-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  background: #eefbfb;
}


/* View All Button */
.random-link-button-wrapper {
  margin-top: 30px;
  text-align: center;
}

.random-link-search-btn {
  padding: 12px 24px;
  background: transparent;
  border: 2px solid #0F7075;
  border-radius: 30px;
  color: #0F7075;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.random-link-search-btn:hover {
  background-color: #0F7075;
  color: #fff;
}


/* Responsive */
@media (max-width: 1024px) {
  .random-link-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .random-link-box {
    font-size: 14px;
    padding: 14px 16px;
  }

  .random-link-search-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}


.relative-container {
    position: relative;
    width: 100%;
}

.data-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    background-color: #fff;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    border-radius: inherit;
}

.has-error::before {
    content: '!';
    background-color: #9c251a;
    font-weight: bold;
    color: #fff;
    padding: 0 0.75rem;
    margin-right: 0.55rem;
    border-radius: 100%;
}

.has-error::after {
    position: relative;
    content: attr(data-error);
    color: #9c251a;
}

.is-loading::before {
    position: absolute;
    content: '';
    height: 60px;
    width: 60px;
    margin: 0 auto;
    border: 8px solid #dfdfdf;
    border-bottom: 8px solid transparent;
    border-radius: 100%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.return-disclaimer {
  font-size: 13px;
  color: #666;
  margin-top: 20px;
  font-style: italic;
}
