@import "/css/main.css";
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css?family=Play&display=swap");
@import url("https://fonts.googleapis.com/css?family=Almarai&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
@import url("https://fonts.googleapis.com/css?family=Galada&display=swap");

/* main Section */
.main {
  background-image: url("../image/Employment.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.main-container {
  z-index: 1;
}

.main-content {
  text-align: center;
}

.main-content h1 {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0;
  padding: 20px 0;
}

.main-content p {
  color: #f5f5f5;
  font-size: 1.7rem;
  margin: 0;
  padding: 20px 0;
  text-align: center;
}

.main-content {
  animation: slideInFromLeft 1s ease-out;
}

.main-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 5;
}

@keyframes move-forever1 {
  0% {
    transform: translate(-90px, 0);
  }
  100% {
    transform: translate(85px, 0);
  }
}

@keyframes move-forever2 {
  0% {
    transform: translate(-90px, 0);
  }
  100% {
    transform: translate(85px, 0);
  }
}

@keyframes move-forever3 {
  0% {
    transform: translate(-90px, 0);
  }
  100% {
    transform: translate(85px, 0);
  }
}

.wave1 use {
  animation: move-forever1 10s linear infinite;
  animation-delay: -2s;
  fill: var(--background);
  opacity: 0.6;
}

.wave2 use {
  animation: move-forever2 8s linear infinite;
  animation-delay: -2s;
  fill: var(--background);
  opacity: 0.4;
}

.wave3 use {
  animation: move-forever3 6s linear infinite;
  animation-delay: -2s;
  fill: var(--background);
  opacity: 0.2;
}

@media (max-width: 480px) {
  .main-content h1 {
    font-size: 3rem;
  }
}
/* ////////////////// */
/*  Tooltip */
.tooltip,
.mobile-tooltip {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
  font-size: 14px;
  line-height: 1.4;
  z-index: 100;
}
.tooltip-header,
.mobile-tooltip-header {
  padding: 12px 16px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.tooltip-header_Ar,
.mobile-tooltip-header_Ar {
  padding: 12px 16px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  gap: 8px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  font-family: "Almarai", "Arial", sans-serif;
}
.tooltip-header .fa,
.mobile-tooltip-header .fa {
  font-size: 18px;
}
.tooltip-header .tooltip-date,
.mobile-tooltip-header .tooltip-date {
  font-size: 14px;
  opacity: 0.9;
}
.tooltip-content,
.mobile-tooltip-content {
  padding: 12px 16px;
}

/* Data rows - shared between both tooltips */
.data-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f4;
}
.data-row.indent {
  padding-left: 15px;
}
.data-row.indent_Ar {
  padding-right: 15px;
}
.data-row.section-header {
  margin-top: 8px;
  padding-bottom: 4px;
  border-bottom: none;
  font-weight: 600;
  color: #2c7be5;
}
.data-row.highlight {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 8px;
  margin: 8px 0;
}
.data-label {
  color: #6e84a3;
  font-weight: 500;
  margin-right: 5px;
}
.data-value {
  color: #12263f;
  font-weight: 600;
  margin-right: 5px;
}

/* **** */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}
.tooltip-icon {
  margin-left: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
}
.tooltip-text {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(100%);
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  width: 270px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
}
.tooltip-text[dir="rtl"] {
  right: 50%;
  transform: translateX(-50%);
  line-height: 2.5;
}
.tooltip-text.show {
  display: block;
}
.indented-list {
  margin-top: 6px;
  padding-left: 1.1rem;
}
.circle-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
}
.indicator-group {
  margin-left: 20px;
}
.indicator-group[dir="rtl"] {
  margin-right: 20px;
}

@media (max-width: 768px) {
  .tooltip-text {
    transform: translateX(-100%);
  }
}
@media (max-width: 480px) {
  .tooltip-text {
    transform: translateX(-50%);
  }
  .tooltip-text[dir="rtl"] {
    transform: translateX(50%);
    line-height: 2.5;
  }
}
@media (max-width: 375px) {
  .tooltip-text {
    transform: translateX(-50%);
  }
  .tooltip-text[dir="rtl"] {
    transform: translateX(50%);
    line-height: 2.5;
  }
}
/* ***** */

/* Desktop-specific tooltip styles */
.tooltip {
  position: absolute;
  max-width: 300px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.mobile-tooltip-content .tooltip-content {
  background: white;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid #ddd;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.data-row .country-name {
  color: #6e84a3;
}

@media (max-width: 768px) {
  .Map {
    padding: 1rem 0;
  }
  .searchMap {
    flex-direction: row;
    width: 100%;
  }
  .legend {
    transform: scale(0.8);
    transform-origin: top left;
  }
  .tooltip {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .mobile-tooltip {
    display: none !important;
  }
}
.legend {
  margin: 10px 0;
}
.loading {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 14px;
}
/* ***** SelectSearch **** */
.itmes-selector {
  width: 250px;
  position: relative;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  margin-right: 10px;
  font-family: "Montserrat Alternates", "ply", "Roboto", "Arial", sans-serif;
  transition: border-color 0.3s ease;
}
.itmes-selector:focus {
  border-color: var(--accent-color);
  outline: none;
}
.itmes-selector[dir="rtl"] {
  position: relative;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  margin-right: 10px;
  font-family: "Almarai", "Arial", sans-serif;
  transition: border-color 0.3s ease;
}
.itmes-selector[dir="rtl"]:focus {
  border-color: var(--accent-color);
  outline: none;
}
@media (max-width: 375px) {
  .itmes-selector {
    width: 250px;
    margin-right: 0;
  }
}

/* ── Select Chart type ── */
.chart-type-group {
  display: flex;
  gap: 0;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  flex-shrink: 0;
}
.chart-type-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #5a5f7a;
  background: #f8f9fb;
  transition:
    background 0.15s,
    color 0.15s;
  user-select: none;
  border-inline-end: 1px solid #dde1ea;
}
.chart-type-group label:last-child {
  border-inline-end: none;
}
.chart-type-group input[type="radio"] {
  display: none;
}
.chart-type-group label:has(input:checked) {
  background: #1a1a2e;
  color: #fff;
}
.chart-type-group label i {
  font-size: 12px;
}

/* ── TABLE STYLES ── */
.oa-table {
  width: 100%;
  border-collapse: separate; /* important for sticky */
  border-spacing: 0;
  border-radius: 5px;
  font-size: 13px;
}

/* ── HEADER ── */
.oa-table thead tr {
  background: var(--primary-color);
  color: white;
}
.oa-table thead th {
  padding: 10px 14px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--primary-color);
  background-clip: padding-box;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  text-align: center;
}
/* first column sticky */
.oa-table thead th:first-child {
  min-width: 80px;
  z-index: 5;
}
/* [dir="rtl"] .th-content {
  flex-direction: row-reverse;
} */

/* content wrapper */
.oa-table thead th .th-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

/* hover */
.oa-table thead th:hover {
  background: #2d2d50;
}

/* sort icons */
.oa-table thead th .sort-icon {
  margin-inline-start: 4px;
}
.oa-table thead th.sort-asc .sort-icon::after {
  content: "▲";
}
.oa-table thead th.sort-desc .sort-icon::after {
  content: "▼";
}
.oa-table thead th:not(.sort-asc):not(.sort-desc) .sort-icon::after {
  content: "⇅";
}

/* ── BODY ── */
.oa-table tbody tr:nth-child(even) {
  background: var(--background);
}
.oa-table tbody tr:nth-child(odd) {
  background: var(--background-dark);
}
.oa-table tbody tr:hover {
  background: var(--background-dark);
}
.oa-table tbody td {
  padding: 9px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

/* ── FIRST COLUMN (STICKY) ── */
.oa-table th:first-child,
.oa-table td:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

/* fix background for sticky column (avoid overlap issues) */
.oa-table tbody tr:nth-child(even) td:first-child {
  background: var(--background);
}
.oa-table tbody tr:nth-child(odd) td:first-child {
  background: var(--background-dark);
}

/* header first cell */
.oa-table thead th:first-child {
  background: var(--primary-color);
}

/* ── FOOTER ── */
.oa-table tfoot tr {
  background: var(--background);
  border-top: 2px solid #c8cce0;
}
.oa-table tfoot td {
  padding: 9px 14px;
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-color);
  white-space: nowrap;
}

/* ── CELL BAR ── */
.oa-table .cell-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.oa-table .cell-bar {
  height: 8px;
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.3s;
}

/* ── TOOLBAR ── */
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.chart-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.oa-table-info {
  font-size: 12px;
  color: var(--light-text);
}

/* export button */
.oa-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #dde1ea;
  border-radius: 7px;
  background: #f8f9fb;
  font-size: 12px;
  font-weight: 500;
  color: #5a5f7a;
  cursor: pointer;
  transition: background 0.15s;
}
.oa-export-btn[dir="rtl"] {
  font-family: "Almarai", "Arial", sans-serif;
}
.oa-export-btn:hover {
  background: #eef0f5;
}
@media (max-width: 425px) {
  .chart-type-group,
  .chart-toolbar-right {
    width: 100%;
  }
  .chart-type-group label {
    flex: 1;
    justify-content: center;
  }
  .chart-toolbar-right {
    justify-content: space-between;
  }
}
@media (max-width: 375px) {
  .chart-type-group,
  .chart-toolbar-right {
    width: 100%;
  }
  .chart-type-group label {
    flex: 1;
    justify-content: center;
  }
  .chart-toolbar-right {
    justify-content: space-between;
  }
}
