.overlay {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgb(256, 256, 256, 0.5);
  z-index: 1000000;
}

.overlay * {
  box-sizing: border-box;
}

.overlay-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  width: 90%;
  max-height: 80vh;
  max-width: 1350px;
  background: #fff;
  border-radius: 4px;
  background: transparent;
}

/* Header */
.overlay-header {
  padding: 0 32px;
}

.overlay-header a.subscribe-btn {
  position: absolute;
  top: -5px;
  right: 48px;
  padding: 8px 20px;
  border: 2px #001E6E solid;
  background-color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 9pt;
  font-weight: 600;
  color: #555;
  border-radius: 8px;
  cursor: pointer;
}

.overlay-header a.subscribe-btn:hover {
  background-color: #369;
  color: #fff;
  border: 2px #369 solid;
  cursor: pointer;
}

.overlay-header a.close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: #fff;
  color: #001E6E;
  padding: 4px 8px;
  font-size: 16pt;
  text-align: center;
  text-decoration: none;
  line-height: 1;
  border: 2px #001E6E solid;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  z-index: 100;
}

.overlay-header a.close:hover {
  background-color: #369;
  color: #fff;
  border: 2px #369 solid;
  cursor: pointer;
}

.overlay-header a.close.higher {
  top: -4px;
}

/* Content */
.overlay-content {
  display: flex;
  min-height: 50px;
  flex-grow: 1;
  background: #fff;
  padding: 32px;
  border: 3px #001E6E solid;
  border-radius: 8px;
}

/* Chart Futures Header */
.chart-futures-header {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  width: fit-content;
  z-index: 100;
}

.chart-futures-header .chart-btn {
  position: relative;
  padding: 12px 20px;
  border-top: 3px #ddd solid;
  border-left: 3px #ddd solid;
  border-right: 3px #ddd solid;
  background-color: #ddd;
  border-bottom: none;
  text-align: center;
  font-size: 11pt;
  font-weight: 600;
  color: #555;
  border-radius: 8px 8px 0 0;
}

.chart-futures-header .chart-code-btn {
  min-width: 0;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.chart-futures-header .chart-btn.active {
  border-top: 3px #001E6E solid;
  border-left: 3px #001E6E solid;
  border-right: 3px #001E6E solid;
  margin-bottom: -3px;
  padding-bottom: 14px;
  color: #001E6E;
  background-color: #fff;
}

.chart-futures-header .chart-btn:hover {
  background-color: #001E6E;
  border-color: #001E6E;
  color: #fff;
}

/* Chart Futures */
.charts-btn {
  position: absolute;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  right: 48px;
  padding: 0 6px;
  cursor: pointer;
  background: #eef5d3;
  color: #001E6E;
  height: 19px;
  border-radius: 4px;
  border: 1px solid #001E6E;
}

.charts-btn svg {
  width: 22px;
  height: 13px;
}

.charts-btn:hover {
  background: #001E6E;
  color: #eef5d3;
}

/* Contracts */
.contract-details {
  width: 100%;
  overflow-y: auto;
}

.contract-details h1 {
  color: rgb(5, 51, 95);
  margin-bottom: 32px;
}

.contract-details table {
  width: 100%;
  border-collapse: collapse;
  border-style: solid;
  border-width: 2px 0;
  border-color: rgb(5, 51, 95, 0.8);
}

.contract-details table tr {
  border-style: solid;
  border-width: 1px 0;
  border-color: rgb(5, 51, 95, 0.8);
  font-size: 14px;
}

.contract-details table tr td:first-child {
  color: rgb(0, 147, 215);
  padding-right: 32px;
}

.contract-details table tr td {
  padding: 10px 0;
}

.contract-details .note {
  display: block;
  margin-top: 24px;
  font-size: 10pt;
}

.contract-btn {
  position: absolute;
  right: 5px;
  padding: 1px 8px;
  cursor: pointer;
  background: #eef5d3;
  color: #001E6E;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #001E6E;
}

.contract-btn:hover {
  background: #001E6E;
  color: #eef5d3;
}

@media only screen and (min-width: 1024px) {
  .contract-details table tr td:first-child {
    white-space: nowrap;
  }
}

@media only screen and (max-width: 1200px) {
  .chart-futures-header {
    width: 100%;
  }

  .chart-futures-header > * {
    flex-grow: 1;
  }

  .chart-futures-header .chart-code-btn {
    padding: 12px 16px;
  }

  .overlay-header a.subscribe-btn {
    top: -48px;
  }

  .overlay-header a.close.higher {
    top: -48px;
  }
}
