.conteiner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: stretch;
  font-family: "Rubik", sans-serif;
}

.table {
  margin: 20px;
  max-width: 400px;
  position: relative;
  background-color: white;
}

h2 {
  text-align: center;
}

td {
  padding: 5px;
}

tr {
  cursor: pointer;
}

.table table tr:hover {
  background-color: #ffebcd80; /*#ceeaece1*/
}

.table table thead tr:hover {
  background-color: transparent;
}

.table table thead tr {
  cursor: text;
}

.table table tr td:nth-child(1) {
  width: 33%;
}

tbody > tr > td:not(:first-child) {
  direction: ltr;
}

.green {
  color: seagreen;
}
.red {
  color: tomato;
}

.stars {
  direction: ltr;
  color: orange;
}

.stock-name {
  text-decoration: underline;
}

.stock-name:hover {
  color: #0000ee;
}

#highest-rated-stocks,
#lowest-rated-stocks,
#highest-rated-bonds,
#lowest-rated-bonds {
  width: 400px;
}

/* #highest-rated-bonds tbody tr td, */
#highest-rated-stocks tbody tr td,
#lowest-rated-stocks tbody tr td,
#highest-rated-bonds tbody tr td:nth-child(3),
#lowest-rated-bonds tbody tr td:nth-child(3) {
  width: 33%;
}
#highest-rated-bonds tbody tr td:nth-child(1) {
  width: 40%;
}
#highest-rated-stocks tbody tr td:nth-child(2),
#lowest-rated-stocks tbody tr td:nth-child(2),
#highest-rated-stocks tbody tr td:nth-child(1),
#lowest-rated-stocks tbody tr td:nth-child(1),
#highest-rated-bonds tbody tr td:nth-child(2),
#lowest-rated-bonds tbody tr td:nth-child(2),
#highest-yeild-etf tbody tr td:nth-child(2) {
  text-align: center;
}

#highest-rated-bonds tbody tr td:nth-child(1),
#lowest-rated-bonds tbody tr td:nth-child(1) {
  width: 35%;
}

#highest-rated-bonds tbody tr td:nth-child(2),
#lowest-rated-bonds tbody tr td:nth-child(2),
#highest-yeild-etf tbody tr td:nth-child(2) {
  width: 30%;
}

#lowest-yeild-etf tbody tr td:nth-child(2) {
  width: 20%;
  text-align: center;
}

#highest-rated-stocks table,
#lowest-rated-stocks table,
#highest-rated-bonds table,
#lowest-rated-bonds table {
  /* position: relative; */
  box-shadow:
    0px 1px 4px 0px #c9cfe0,
    -1px 4px 4px 0px #00000040;
  /* border: 2.5px solid transparent; */
  background: white;
  border-radius: 10px;
  /* background-clip: padding-box; */
}

#highest-rated-stocks table thead tr th,
#lowest-rated-stocks table thead tr th,
#highest-rated-bonds table thead tr th,
#lowest-rated-bonds table thead tr th {
  font-size: 14px;
  white-space: nowrap;
}

#highest-rated-stocks table tbody tr td:first-child,
#lowest-rated-stocks table tbody tr td:first-child,
#highest-rated-bonds table tbody tr td:first-child,
#lowest-rated-bonds table tbody tr td:first-child {
  font-size: 14px;
  color: #00367c;
  text-decoration: none;
}

#highest-rated-stocks table tbody tr td:nth-child(2),
#lowest-rated-stocks table tbody tr td:nth-child(2),
#highest-rated-bonds table tbody tr td:nth-child(2),
#lowest-rated-bonds table tbody tr td:nth-child(2) {
  font-size: 14px;
}

#highest-rated-stocks table tbody tr td:first-child:hover,
#lowest-rated-stocks table tbody tr td:first-child:hover,
#highest-rated-bonds table tbody tr td:first-child:hover,
#lowest-rated-bonds table tbody tr td:first-child:hover {
  color: #006bb7;
}

#highest-rated-stocks table tbody tr:hover,
#lowest-rated-stocks table tbody tr:hover,
#highest-rated-bonds table tbody tr:hover,
#lowest-rated-bonds table tbody tr:hover {
  background-color: transparent;
}

/* #highest-rated-stocks table::after,
#lowest-rated-stocks table::after,
#highest-rated-bonds table::after,
#lowest-rated-bonds table::after {
  

  position: absolute;
  top: -2.5px;
  bottom: -2.5px;
  left: -2.5px;
  right: -2.5px;
  background: linear-gradient(185.83deg, #fdcc5f 4.79%, #00367c 94.8%);
  content: "";
  z-index: -1;
  border-radius: 8px;
} */

.pro-border-image {
  position: absolute;
  bottom: -20px;
  left: 43%;
}

@media (min-width: 1024px) {
  #highest-rated-stocks table::after,
  #lowest-rated-stocks table::after,
  #highest-rated-bonds table::after,
  #lowest-rated-bonds table::after {
    /* content: "";
  background: linear-gradient(185.83deg, #fdcc5f 4.79%, #00367c 94.8%);
  position: absolute;
  right: -3.5px;
  top: -2.5px;
  width: 100%;
  bottom: -3.5px;
  z-index: -1;
  border-radius: 10px; */

    position: absolute;
    top: -2.5px;
    bottom: -2.5px;
    left: -2.5px;
    right: -2.5px;
    background: linear-gradient(185.83deg, #fdcc5f 4.79%, #00367c 94.8%);
    content: "";
    z-index: -1;
    border-radius: 8px;
  }
}

@media (max-width: 768px) {
  .mobile-rates-titles {
    display: flex;
    justify-content: center;
    gap: 3em;
    padding-bottom: 1em;
  }

  .rate-mobile-title {
    color: rgba(0, 107, 183, 1);
    font-size: 19px;
    font-weight: 600;
    position: relative;
    width: 45%;
    text-align: center;
    white-space: nowrap;
  }

  .rate-mobile-title.selected {
    color: rgba(0, 54, 124, 1);
    font-weight: 700;
  }

  .rate-mobile-title.selected:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 165, 39, 1);
    right: 0;
    bottom: -1px;
  }

  #highest-rated-stocks-table,
  #lowest-rated-stocks-table,
  #highest-rated-bonds-table,
  #lowest-rated-bonds-table {
    background:
      linear-gradient(#fff, #fff) padding-box,
      linear-gradient(to right, rgba(255, 165, 39, 1), rgba(0, 54, 124, 0.28))
        border-box !important;
    padding: 2px;
    border: 2px solid transparent;
  }

  #highest-rated-stocks-table,
  #lowest-rated-stocks-table {
    padding-bottom: 16px;
  }
  #stocks-highest-rate,
  #highest-rated-bonds-title {
    color: rgba(0, 54, 124, 1);
    font-weight: 600;
    font-size: 20px;
  }
  #highest-rated-stocks tbody tr td,
  #lowest-rated-stocks tbody tr td,
  #highest-rated-bonds tbody tr td:nth-child(3),
  #lowest-rated-bonds tbody tr td:nth-child(3) {
    width: auto;
    white-space: nowrap;
  }

  #highest-rated-stocks-table thead tr,
  #highest-rated-stocks-table tbody tr,
  #lowest-rated-stocks-table thead tr,
  #lowest-rated-stocks-table tbody tr {
    border-bottom: 1px solid #d9d9d9;
  }

  #highest-rated-stocks,
  #lowest-rated-stocks,
  #highest-rated-bonds,
  #lowest-rated-bonds,
  #positive-yield-stocks,
  #negative-yield-stocks,
  #positive-yield-bonds,
  #negative-yield-bonds,
  #highest-yeild-etf,
  #lowest-yeild-etf {
    margin: 0 !important;
    max-width: 100%;
    padding-bottom: 10px;
  }

  body {
    margin: 0;
  }

  #highest-rated-stocks-table thead {
    display: block;
    width: 100%;
  }

  #highest-rated-stocks-table thead tr,
  #highest-rated-stocks-table tbody tr,
  #lowest-rated-stocks-table tbody tr,
  #lowest-rated-stocks-table thead tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  #highest-rated-stocks-table tbody,
  #lowest-rated-stocks-table tbody {
    display: block;
  }

  #highest-rated-stocks table thead tr th,
  #lowest-rated-stocks table thead tr th,
  #highest-rated-bonds table thead tr th,
  #lowest-rated-bonds table thead tr th {
    padding: 5px;
  }

  .pro-border-image {
    border-width: 6px;
  }

  #highest-rated-stocks-table + .pro-border-image {
    bottom: -8px;
    right: 37%;
  }

  #lowest-rated-stocks-table + .pro-border-image {
    bottom: -8px;
    right: 37%;
  }

  #lowest-rated-stocks {
    padding-bottom: 18px;
  }

  /* #highest-rated-stocks-table {
    padding-bottom: 3px;
  } */

  #lowest-rated-bonds {
    padding-bottom: 22px; /*22px*/
  }

  #highest-rated-stocks:has(#low-rate-title.rate-mobile-title.selected),
  #highest-rated-bonds:has(#low-rate-bond-title.selected) {
    padding-bottom: 0;
  }

  #highest-rated-bonds-table + .pro-border-image,
  #lowest-rated-bonds-table + .pro-border-image {
    bottom: -6px;
    right: 37%;
  }

  #highest-rated-stocks:has(#high-rate-title.selected) {
    padding-bottom: 18px; /*22px*/
  }

  #highest-rated-bonds:has(#high-rate-bond-title.selected),
  #lowest-rated-bonds:has(#low-rate-bond-title.selected) {
    padding-bottom: 24px;
  }

  #lowest-rated-bonds-table + .pro-border-image {
    bottom: -8px;
  }

  #lowest-rated-bonds table tbody tr td:first-child,
  #highest-rated-bonds table tbody tr td:first-child {
    white-space: nowrap;
  }

  .title-midnightblue-bold {
    font-weight: 600;
    color: #00367c;
  }

  #positive-yield-stocks-table,
  #negative-yield-stocks-table,
  #positive-yield-bonds-table,
  #negative-yield-bonds-table,
  #negative-yield-etfs-table,
  #positive-yield-etfs-table {
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid #9d9d9d33;
  }

  .stocks-text-bright-blue {
    color: #006bb7;
  }

  #positive-yield-stocks:has(#neg-yield-stock-title.selected),
  #positive-yield-bonds:has(#neg-yield-bond-title.selected),
  #highest-yeild-etf {
    padding-bottom: 0;
  }

  #positive-yield-stocks,
  #negative-yield-bonds,
  #positive-yield-bonds,
  #highest-yeild-etf {
    width: 100%;
  }

  #negative-yield-stocks-table tbody tr td,
  #positive-yield-stocks-table tbody tr td,
  #negative-yield-bonds-table tbody tr td,
  #positive-yield-bonds-table tbody tr td,
  #negative-yield-etfs-table tbody tr td,
  #positive-yield-etfs-table tbody tr td {
    white-space: nowrap;
  }

  #negative-yield-bonds-table tbody tr td,
  #positive-yield-bonds-table tbody tr td,
  #negative-yield-stocks-table tbody tr td:not(:first-child),
  #positive-yield-stocks-table tbody tr td:not(:first-child) {
    font-size: clamp(10px, 3.4vw, 14px);
  }

  #highest-rated-stocks:has(#high-rate-title.selected) + #lowest-rated-stocks,
  #highest-rated-bonds:has(#high-rate-bond-title.selected)
    + #lowest-rated-bonds {
    padding-bottom: 0;
  }

  #highest-rated-bonds-table,
  #lowest-rated-bonds-table {
    /* padding: 0 13px 10px; */
  }
}
