.forex-market-overview {
  height: 100%;
}

.forex-market-overview__panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(52, 84, 185, 0.16), transparent 32%),
    linear-gradient(180deg, #0d1532 0%, #090f24 100%);
  border: 1px solid #1b2958;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(3, 8, 24, 0.28);
  color: #e5edff;
  max-height: 580px;
  overflow: hidden;
}

.forex-market-overview__header {
  padding: 16px 16px 10px;
}

.forex-market-overview__title-wrap {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.forex-market-overview__title {
  color: #f5f8ff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.forex-market-overview__status {
  color: #7f8fbe;
  font-size: 11px;
  text-transform: uppercase;
}

.forex-market-overview__controls {
  display: grid;
  gap: 10px;
  padding: 0 16px 12px;
}

.forex-market-overview__search,
.forex-market-overview__sort {
  appearance: none;
  background: #111b3f;
  border: 1px solid #22356d;
  border-radius: 10px;
  color: #edf3ff;
  font-size: 13px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.forex-market-overview__search::placeholder {
  color: #7485b8;
}

.forex-market-overview__search:focus,
.forex-market-overview__sort:focus {
  border-color: #3457c8;
  box-shadow: 0 0 0 2px rgba(52, 87, 200, 0.18);
}

.forex-market-overview__filters {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  margin-top: 10px;
}

.forex-market-overview__filter {
  align-items: center;
  background: #101a3d;
  border: 1px solid #22356d;
  border-radius: 999px;
  color: #a6b4dc;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.15s ease;
  width: 100%;
}

.forex-market-overview__filter--wide {
  grid-column: 1 / -1;
}

.forex-market-overview__filter-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 16px;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.forex-market-overview__filter-icon img {
  display: block;
  height: 16px;
  object-fit: contain;
  width: 16px;
}

.forex-market-overview__filter-icon--crypto img,
.forex-market-overview__filter-icon--forex img,
.forex-market-overview__filter-icon--commodities img,
.forex-market-overview__filter-icon--stocks img,
.forex-market-overview__filter-icon--indices img {
  filter: brightness(0) saturate(100%) invert(88%) sepia(11%) saturate(385%) hue-rotate(186deg) brightness(101%) contrast(95%);
}

.forex-market-overview__filter-icon--crypto img {
  height: 19px;
  width: 19px;
}

.forex-market-overview__filter-label {
  line-height: 1.1;
}

.forex-market-overview__filter:hover,
.forex-market-overview__filter:focus {
  border-color: #3a61dc;
  color: #eef3ff;
  outline: none;
}

.forex-market-overview__filter.is-active {
  background: rgba(45, 96, 255, 0.2);
  border-color: #3c66e8;
  box-shadow: inset 0 0 0 1px rgba(126, 158, 255, 0.16);
  color: #f5f8ff;
}

.forex-market-overview__head {
  border-top: 1px solid rgba(89, 109, 171, 0.15);
  border-bottom: 1px solid rgba(89, 109, 171, 0.18);
  color: #7e8ebb;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(86px, 0.9fr);
  padding: 10px 16px;
  text-transform: none;
}

.forex-market-overview__head span {
  font-size: 11px;
  font-weight: 600;
}

.forex-market-overview__head-sort {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  gap: 6px;
  padding: 0;
}

.forex-market-overview__head-sort:hover,
.forex-market-overview__head-sort:focus {
  color: #cbd7ff;
  outline: none;
}

.forex-market-overview__head-price,
.forex-market-overview__head-change {
  text-align: right;
  justify-content: flex-end;
}

.forex-market-overview__sort-arrows {
  display: inline-flex;
  flex-direction: column;
  height: 10px;
  justify-content: space-between;
  width: 8px;
}

.forex-market-overview__sort-arrows::before,
.forex-market-overview__sort-arrows::after {
  color: #596b9d;
  content: '';
  display: block;
  height: 0;
  margin: 0 auto;
  width: 0;
}

.forex-market-overview__sort-arrows::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid #596b9d;
}

.forex-market-overview__sort-arrows::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #596b9d;
}

.forex-market-overview__head-sort[data-sort-direction='asc'] .forex-market-overview__sort-arrows::before {
  border-bottom-color: #dce7ff;
}

.forex-market-overview__head-sort[data-sort-direction='asc'] .forex-market-overview__sort-arrows::after {
  border-top-color: #405381;
}

.forex-market-overview__head-sort[data-sort-direction='desc'] .forex-market-overview__sort-arrows::before {
  border-bottom-color: #405381;
}

.forex-market-overview__head-sort[data-sort-direction='desc'] .forex-market-overview__sort-arrows::after {
  border-top-color: #dce7ff;
}

.forex-market-overview__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #2f427d #09112a;
  scrollbar-width: thin;
}

.forex-market-overview__list::-webkit-scrollbar {
  width: 8px;
}

.forex-market-overview__list::-webkit-scrollbar-track {
  background: #09112a;
}

.forex-market-overview__list::-webkit-scrollbar-thumb {
  background: #2f427d;
  border-radius: 999px;
}

.forex-market-overview__empty {
  color: #8b9bc7;
  font-size: 13px;
  padding: 18px 16px;
}

.forex-market-overview__row {
  align-items: center;
  border-top: 1px solid rgba(82, 103, 170, 0.14);
  color: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(86px, 0.9fr);
  min-height: 60px;
  padding: 11px 16px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.forex-market-overview__row:hover,
.forex-market-overview__row:focus {
  background: rgba(28, 44, 92, 0.62);
  border-top-color: rgba(86, 116, 214, 0.22);
  color: inherit;
  outline: none;
  text-decoration: none;
}

.forex-market-overview__row.is-active {
  background: rgba(32, 57, 129, 0.34);
}

.forex-market-overview__name {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.forex-market-overview__badge {
  align-items: center;
  background: linear-gradient(180deg, #21397f 0%, #16295c 100%);
  border: 1px solid #3250a8;
  border-radius: 50%;
  color: #f5f8ff;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  text-transform: uppercase;
  width: 28px;
}

.forex-market-overview__meta {
  min-width: 0;
  width: 100%;
}

.forex-market-overview__label-line {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.forex-market-overview__label {
  color: #f5f8ff;
  display: block;
  flex: 0 1 auto;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forex-market-overview__icon {
  border-radius: 50%;
  flex: 0 0 20px;
  height: 20px;
  object-fit: cover;
  width: 20px;
}

.forex-market-overview__code {
  color: #7f90c0;
  display: block;
  font-size: 11px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.forex-market-overview__price,
.forex-market-overview__change {
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.forex-market-overview__price {
  border-radius: 4px;
  color: #eef3ff;
  display: inline-block;
  font-weight: 700;
  justify-self: end;
  padding: 1px 4px;
  transition: color .3s ease, background-color .9s ease;
}

.forex-market-overview__price.is-up {
  animation: flash-up .9s ease;
  color: #2cd38e;
}

.forex-market-overview__price.is-down {
  animation: flash-down .9s ease;
  color: #ff667e;
}

.forex-market-overview__price.is-flat {
  color: #eef3ff;
}

.forex-market-overview__change {
  font-weight: 700;
}

.forex-market-overview__change.is-up {
  color: #2cd38e;
}

.forex-market-overview__change.is-down {
  color: #ff667e;
}

.forex-market-overview__change.is-flat {
  color: #96a4cd;
}

@keyframes flash-up {
  from { background: rgba(34, 197, 94, .15); }
  to { background: transparent; }
}

@keyframes flash-down {
  from { background: rgba(239, 68, 68, .15); }
  to { background: transparent; }
}

@media (max-width: 1399px) {
  .forex-market-overview__list {
    max-height: 460px;
  }
}

@media (max-width: 1199px) {
  .forex-market-overview__list {
    max-height: 340px;
  }
}

:root[data-platform-theme='light'] .forex-market-overview__title,
:root.theme-light .forex-market-overview__title,
:root[data-platform-theme='light'] .forex-market-overview__search,
:root.theme-light .forex-market-overview__search,
:root[data-platform-theme='light'] .forex-market-overview__sort,
:root.theme-light .forex-market-overview__sort,
:root[data-platform-theme='light'] .forex-market-overview__filter,
:root.theme-light .forex-market-overview__filter,
:root[data-platform-theme='light'] .forex-market-overview__label,
:root.theme-light .forex-market-overview__label,
:root[data-platform-theme='light'] .forex-market-overview__price,
:root.theme-light .forex-market-overview__price {
  color: var(--platform-text-strong) !important;
}

:root[data-platform-theme='light'] .forex-market-overview__status,
:root.theme-light .forex-market-overview__status,
:root[data-platform-theme='light'] .forex-market-overview__search::placeholder,
:root.theme-light .forex-market-overview__search::placeholder,
:root[data-platform-theme='light'] .forex-market-overview__head,
:root.theme-light .forex-market-overview__head,
:root[data-platform-theme='light'] .forex-market-overview__code,
:root.theme-light .forex-market-overview__code {
  color: var(--platform-text-muted) !important;
}

:root[data-platform-theme='light'] .forex-market-overview__filter-icon--crypto img,
:root.theme-light .forex-market-overview__filter-icon--crypto img,
:root[data-platform-theme='light'] .forex-market-overview__filter-icon--forex img,
:root.theme-light .forex-market-overview__filter-icon--forex img,
:root[data-platform-theme='light'] .forex-market-overview__filter-icon--commodities img,
:root.theme-light .forex-market-overview__filter-icon--commodities img,
:root[data-platform-theme='light'] .forex-market-overview__filter-icon--stocks img,
:root.theme-light .forex-market-overview__filter-icon--stocks img,
:root[data-platform-theme='light'] .forex-market-overview__filter-icon--indices img,
:root.theme-light .forex-market-overview__filter-icon--indices img {
  filter: none !important;
}
