/* Main */

#dert {
  width: 100%;
  background-color: #f7f5f3;
  position: relative;
  font-family: "breve_news_book", sans-serif;
  padding-top: 1rem;
}

/* Adjusts the position of the arrow in RTL mode */
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
  left: 8px; /* Move to the left side; adjust the value as necessary */
  right: auto; /* Reset the default positioning */
}

/* Adjusts the padding to accommodate the arrow on the left */
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__rendered {
  padding-left: 20px; /* Make room for the arrow on the left */
  padding-right: 8px; /* Adjust based on your design */
}


@media screen and (max-width: 750px) {
  #xr {
    border-top: 0;
  }
}

/* General */
#xr .form-control,
#rcc .form-control {
  background-color: #f7f5f3;
  border-radius: 0 !important;
}

.bulky-text{
  letter-spacing: 0 !important;
}

#xr .bulky-text,
#rcc .bulky-text {
  color: #122c45;
}

.align-text-right {
  text-align: right !important;
}

.verticaltext svg {
  margin: 0 0.75rem;
}

.verticaltext.ports {
  font-size: 2.25rem !important;
}

/* Arabic headings section */

.module-contents.monitoring-timeline .top-row .module-number-arabic{
  left: 110.333333% !important;
}

.module-contents.monitoring-timeline .top-row .title-arabic {
  max-width: 1000px;
}

/* Heading */
#dert .top-heading,
#rcc .heading {
  width: 100%;
  min-height: 5rem;
  padding-left: 2rem;
  background-color: #f7f5f3;
  font-family: breve_title_book_italic;

  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-bottom: 2rem;
  padding-top: 3rem;
}

#rcc .heading {
  justify-content: flex-start;
}

#dert .top-heading {
  padding-bottom: 0.5rem;
}

/* Heading */
#dert .heading-title {
  width: 100%;
  min-height: 5rem;
  padding-left: 2rem;
  background-color: #f7f5f3;
  font-family: breve_title_book_italic;

  /* display: flex; */
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 0;
  padding-top: 3rem;
}

@media screen and (max-width: 992px) {
  #dert .top-heading,
  #rcc .heading {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  #dert .top-heading h2,
  #rcc .heading h2 {
    font-size: 2.5rem;
    padding: 2rem 0;
  }

  #dert .heading-title {
    padding-bottom: 2rem;
  }
}

/* Time Period and Slider */
#regional-time-period {
  max-width: 450px;
  margin-right: 10%;
}

.time-period-container {
  display: flex;
  justify-content: space-between;
}

.slider-container {
  width: 100%;
}

.de-time-slider {
  min-width: 595px;
  margin-right: 6rem;
  font-family: "breve_news_book", sans-serif;
}

.de-time-slider .form-control {
  background-color: white !important;
}

.de-time-slider .xr-input:first-child {
  margin-right: 2rem;
}

.de-time-slider .bulky-text {
  margin-right: 0.5rem;
}

.de-time-slider-disclaimer {
  display: flex;
  justify-content: flex-end;
}

.de-time-slider-disclaimer-text {
  background-color: #f7f5f3;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.de-time-slider-disclaimer-text p {
  font-size: 0.8rem;
  color: #122c45;
  padding: 0.5rem 1rem;
  margin: 0;
  font-family: "breve_news_book", sans-serif;
}

@media (min-width: 992px) {
  #regional-time-period {
    margin-left: 3rem;
  }

  #geography {
    margin-left: 3rem;
  }

  .de-time-slider-disclaimer {
    display: none;
  }
}

@media (max-width: 992px) {
  #slider {
    display: none;
  }
  .de-time-slider {
    width: 100%;
    min-width: 0;
    margin-bottom: 2rem;
  }
  #dert .top-heading .de-time-slider-container {
    width: 100%;
    background-color: white;
    border-top: 2px solid #e9ecef;
  }

  #dert .top-heading .de-time-slider-container .form-control {
    background-color: #f7f5f3 !important;
  }

  #rcc .time-period {
    width: 130px;
    height: 35px;
  }

  #regional-time-period {
    margin-right: 0;
  }
}
/* 
@media (min-width: 1200px) {
  .time-period-container {
    width: 350px;
  }
} */

/* Heading Filter container */
#dert .heading .xr__filter-container {
  width: 30%;
  height: 110px !important;
  border: 0;
}

#dert .heading .xr__filter-title {
  font-size: 1.4rem;
  min-width: 170px;
  margin-bottom: 0;
}

.xr-input label {
  width: 50px;
  font-size: 0.8rem;
  color: black !important;
}
.xr-input input {
  width: 93px;
  text-align: center;
  font-size: 0.8rem;
  border: none;
}

@media (min-width: 1200px) {
  .xr-input label {
    width: 100%;
    margin: 0;
    text-align: left !important;
  }
}

@media (max-width: 992px) {
  #dert .heading .xr__filter-title {
    margin-bottom: 0.875rem;
    margin-top: 0.875rem;
  }
}

/* Graph */
#dert .de-graph-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#dert .de-graph-container .de-graph {
  width: 1050px;
  height: auto;
  background-color: rgb(55, 70, 89);
  border-radius: 15rem 0 0 15rem;
  z-index: 3;
}

#dert .de-graph-container .de-graph {
  display: flex;
  justify-content: flex-end;
  height: 400px;
}

#dert .chart-block #line-chart {
  padding: 0 !important;
}

#dert .de-graph-container .chart-block-scale {
  width: 90%;
}

#dert .arrow-up::before {
  color: #f4c08e;
  content: "▲";
}

#dert .arrow-down::before {
  color: #f4c08e;
  content: "▼";
}

#dert .figure-comparison {
  color: #f4c08e;
}

@media (max-width: 992px) {
  #dert .de-graph-container .de-graph {
    display: flex;
    justify-content: center;
    height: auto;
  }

  #dert .de-graph-container .chart-block-scale {
    width: 80%;
  }
}

@media (min-width: 1500px) {
  #dert .de-graph-container .de-graph {
    width: 1200px;
  }
}

@media (min-width: 1800px) {
  #dert .de-graph-container .de-graph {
    width: 1300px;
  }
}

/* Content */
#dert .de-content {
  box-sizing: border-box;
  transform: translateY(-10%);
  z-index: -1;
  background-color: white;
  min-height: 500px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding-top: 10rem;
  flex-wrap: wrap;
  padding-bottom: 6rem;
}

#dert .de-content .de-content-body {
  box-sizing: border-box;
  padding: 0 6rem;
  width: 50%;
  min-width: 400px;
  margin-bottom: 2rem;
}

#dert .de-content span:first-child {
  margin-bottom: 2rem;
}

#dert .de-content .bulky-text {
  margin: 2rem 0;
}

@media (max-width: 992px) {
  #dert .de-content {
    padding-bottom: 0;
  }

  #dert .de-content .de-content-body {
    width: 100%;
    min-width: 100%;
    padding: 0 3rem;
  }
}

/* Options */
#rcc .xr__filter-container {
  width: 30%;
  height: 190px !important;
}

#rcc .xr__filter-title {
  font-size: 1.1rem;
  /* min-width: 170px; */
}

#rcc .xr__filter-subtitle {
  font-size: 0.65rem;
  color: #949492;
}

.xr-list li::before {
  content: "\2192";
  color: orange;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  margin-right: 0.5em;
  font-weight: bold;
}

.xr__filter-box {
  width: 100%;
  height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.xr small {
  font-size: 0.54em;
}

.xr__filter-button {
  border-radius: 0;
  background-color: #f7f5f3;
  color: black;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  height: 35px;
}

.currency-btn {
  color: rgb(194, 194, 194);
}

.currency-btn.active {
  background-color: #f7f5f3;
  color: black;
}

.xr .time-period {
  font-size: 0.7rem;
  color: #262e3d;
  background-color: #f7f5f3;
  border-radius: 0;
  padding: 0.5rem 1rem;
  text-align: left;
  border: none;
  max-width: 120px;
  height: 35px;
}

.xr .time-period-container {
  display: flex;
  justify-content: space-between;
}

/* .xr .geography-select {
  height: 200px !important;
} */

#whoarewe .select2-dropdown {
  background-color: #f7f5f3 !important;
  border-top: 1px solid #fff !important;
}

.regional-filters {
  font-family: "breve_news_book", sans-serif;
}

.regional-filters small {
  font-size: 0.5rem;
}

.regional-timelapse {
  min-width: 250px;
}

.commmodity-and-source-container {
  min-width: 350px;
}

/* #rcc #geography {
  height: 100%;
} */

#rcc .commodity-and-source-select,
#rcc .geography-and-source-select {
  margin-top: 1.45rem;
}

#rcc .key-events .key-events-description {
  font-size: 0.775rem;
  width: 80%;
  line-height: 1rem;
}

.row .rcc-content {
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 5rem;
  padding-bottom: 7rem;
  min-height: 20rem;
  /* background-color: #f7f5f3; */
}

#rcc .rcc-content {
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 5rem;
  padding-bottom: 7rem;
  min-height: 20rem;
  /* background-color: #f7f5f3; */
}

@media (min-width: 1400px) {
  .regional-timelapse p {
    display: flex;
    /* justify-content: center; */
    align-items: center;
    /* margin-bottom: 0 !important; */
  }
}

/* Container for selected items */
#rcc-commodity-multi-selections,
#rcc-geography-multi-selections {
  padding-right: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  align-items: center;
  min-height: 40px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

#rcc-commodity-multi-selections .rcc-commodity-multi-selection,
#rcc-geography-multi-selections .rcc-geography-multi-selection {
  display: flex;
}

#rcc-commodity-multi-selections .rcc-commodity-multi-selection .close,
#rcc-geography-multi-selections .rcc-geography-multi-selection .close {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f7f5f3;
  height: 20px;
  width: 20px;
  margin-right: 1px;
  cursor: pointer;
}

#rcc-commodity-multi-selections .rcc-commodity-multi-selection .close svg,
#rcc-geography-multi-selections .rcc-geography-multi-selection .close svg {
  height: 60%;
  width: 60%;
}

#rcc-commodity-multi-selections .rcc-commodity-multi-selection .label,
#rcc-geography-multi-selections .rcc-geography-multi-selection .label {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f7f5f3;
  height: 20px;
  padding: 0 5px;
  font-size: 0.8rem;
}

.selected-hidden {
  display: none !important;
}

@media (min-width: 1201px) {
  #mapdiv {
    display: block;
  }
}

@media (min-width: 992px) {
  #rcc .select-a-geography {
    width: 38% !important;
    min-width: 320px;
  }
}

@media (min-width: 1200px) {
  #rcc .select-a-geography {
    width: 33.3% !important;
    min-width: 270px;
  }
}

@media (max-width: 1200px) {

  #rcc .regional-filters small {
    font-size: 0.6rem;
  }
}

@media (max-width: 992px) {
  #rcc #regional-time-period .xr__filter-title {
    margin-bottom: 1rem !important;
  }

  #rcc .select-a-geography {
    height: 94% !important;
  }
}

/* Select2 styles */
.select2-container {
  width: 130px !important;
  font-size: 0.8rem;
}

.select2-selection {
  background-color: #f7f5f3 !important;
  border-radius: 0 !important;
  border: none !important;
}

.select2-container .select2-selection--single {
  height: 35px !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 13px !important;
}

.select2-selection,
.textarea.select2-search__field,
textarea.select2-search__field {
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
}

.select2-container--default .select2-search--inline .select2-search__field {
  font-family: "breve_news_book";
}

#rcc .commodity-and-source-select .select2-container,
#rcc .geography-and-source-select .select2-container {
  width: 220px !important;
}

span.select2-selection.select2-selection--multiple {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 35px;
  user-select: none;
  cursor: pointer;
}

textarea.select2-search__field::placeholder {
  color: rgb(61, 61, 61);
}

.custom-placeholder {
  position: absolute;
  top: 8px;
  left: 12px;
  color: #999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
  font-size: 0.8rem;
}

.flipped {
  transform: scaleY(-1);
}

.custom-arrow {
  position: absolute;
  pointer-events: none;
  top: 13px;
  left: 205px;
  border-color: #888 transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  cursor: pointer;
}

/* Ensure that optgroup labels are initially visible */
#select2-rcc-commodity-multi-results {
  display: block !important;
}

#select2-rcc-commodity-multi-results .select2-results__group,
#select2-rcc-geography-multi-results .select2-results__group {
  text-transform: uppercase;
  color: #122c43;
  font-weight: 800;
  font-family: "Work Sans", sans-serif;
  font-size: 9px;
}

.select2-results__group:hover {
  cursor: pointer;
}

/* TODO: add dropdown arrow styling */

.xr-internal-arrow-icon {
  height: 8px;
  padding-left: 7rem;
  -webkit-transition: 200ms ease all;
  transition: 200ms ease all;
}
.xr-internal-arrow-icon.rotate {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
  -webkit-transition: 200ms ease all;
  transition: 200ms ease all;
}

/* .select2-results__group::after {
  border-color: red transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0 4px;
}

.select2-results__group.expanded::after {
  transform: rotate(180deg); 
} */

.select2-container--default .select2-selection--multiple {
  position: relative;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__rendered {
  padding-left: 0; /* Adjust padding to account for custom placeholder */
}

div[id^="chartjs-tooltip"] {
  opacity: 0;
  position: absolute;
  font-size: 12px;
  padding: 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1000;
  width: auto;
  height: auto;
  background-color: #122c43;
  color: white;
  font-family: "Work Sans", sans-serif;
}

div[id^="chartjs-tooltip"] .chartjs-tooltip-key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  opacity: 0.7;
}

/* Media queries */
@media (min-width: 992px) {
  .xr #time-period {
    width: 80%;
  }
}

@media (max-width: 991px) {
  .xr {
    font-size: 1.1em !important;
  }

  .xr__filter-container {
    width: 100% !important;
    height: 190px !important;
  }

  /* .xr__filter-container:first-child {
    border-bottom: 1px solid #e9ecef;
  } */

  .xr__filter-container p {
    font-size: 1.2rem;
  }

  .xr__filter-box {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    height: 85%;
  }

  .xr .xr-input label {
    width: 50px;
  }

  .xr .xr-input input {
    width: 140px;
    text-align: center;
  }
}

.geography-selector {
  width: 128px;
}

.geography-selector:first-child {
  margin-right: 10px;
}

@media (max-width: 992px) {
  .geography-selector:first-child {
    margin-right: 0;
  }
}

/* Graph */

.rcc-graph-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.rcc-graph-container .rcc-graph {
  width: 85%;
  max-width: 900px;
  height: 500px;
}

.rcc-graph-container .rcc-graph-heading {
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .rcc-graph-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rcc-graph-container .rcc-graph-heading {
    width: 85%;
    margin-bottom: 1.5rem;
  }
}

.rcc-graph-container #legend {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-left: 3rem;
  margin-top: 1rem;
}

.rcc-graph-container .rcc-legend {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #eaeaea;
}

.rcc-graph-container .rcc-legend-item {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.rcc-graph-container .rcc-legend-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
}

.rcc-graph-container .rcc-legend-label {
  font-size: 12px;
  color: #333;
  font-family: auto;
  flex: 0 0 auto;
}

.rcc-graph-container .rcc-legend-source {
  font-size: 12px;
  color: #909090;
  font-family: auto;
  margin-left: 0.2rem;
  flex: 0 0 auto;
}

/* Table */

.rcc-table-container {
  width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  margin-bottom: 8rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-left: 2rem;
}

.rcc-table-container .rcc-table-heading {
  margin-bottom: 1rem;
  color: black;
}

.rcc-table {
  max-width: 650px;
}

.rcc-table .reverse-columns {
  direction: rtl;
}

.rcc-table thead {
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.rcc-table th {
  font-weight: bold;
  text-transform: uppercase;
  text-align: left;
  padding: 10px;
  font-family: "Work Sans", sans-serif;
  color: #262e3d;
  font-size: 0.7rem;
  vertical-align: top;

  padding-left: 0;
}

.rcc-table th:first-child {
  min-width: 100px;
}

.rcc-table th:nth-child(3) {
  min-width: 100px;
}

.rcc-table tr {
  position: relative;
  z-index: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  font-family: breve_news_book !important;
}

.rcc-table tr td {
  border-bottom: none;
  padding: 15px 0;
}

.rcc-table tr th:nth-child(2),
.rcc-table tr td:nth-child(2) {
  padding-left: 15px;
  padding-right: 15px;
}

.rcc-table .read-more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 992px) {
  .rcc-table-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
  }
  .rcc-table {
    max-width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
  }

  .rcc-table .table-responsive {
    width: 100%;
  }

  .rcc-table-container .rcc-table-heading {
    width: 85%;
    padding-top: 5rem;
  }
}

/* Chart */

.key-figures-container {
  font-variant-ligatures: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-size: var(--bs-body-font-size);
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  color: var(--bs-body-color);
  text-align: var(--bs-body-text-align);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: "Work Sans", sans-serif;
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 0;
  box-sizing: border-box;
  max-width: 100%;
  margin-top: var(--bs-gutter-y);
  -webkit-box-flex: 0;
  flex: 0 0 auto;
  width: 33.33333333%;
  /* pointer-events: auto; */
  padding: 10px 2rem 20px 1rem;
  position: relative;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  flex-direction: column;
  -webkit-box-pack: start;
  justify-content: flex-start;
  transition-duration: 0.5s;
  transition-timing-function: ease;
  transition-delay: 50ms;
  transition-property: opacity, transform, -webkit-transform;
  opacity: 1;
  transform: none;
  height: 300px;
}

@media (max-width: 992px) {
  #dert .de-graph-container .de-graph {
    border-radius: 0;
    padding: 3rem 0;
  }

  #dert .chart-block {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .key-figures-container {
    width: 100%;
    text-align: center;
  }
}
