/* ===== Tabs + accordion section ===== */
.mx-tabs {
  /* Variables for easy theming */
  --mx-body-max-width: 100%;
  --mx-primary: #032d6b;
  /* Dark blue for active tabs & text */
  --mx-bg-tabs: #e6eff7;
  /* Light blue background for tab container */
  --mx-bg-acc: #f0f6fc;
  /* Light blue background for accordion items */
  --mx-text-dark: #1c2b45;
  /* Dark text for titles */
  --mx-text-light: #5c7893;
  /* Gray-blue text for inactive/bodies */
  --mx-border-radius: 12px;
  /* Rounded corners */

  width: 100%;
  direction: rtl;
}

/* ---- tab buttons ---- */
.mx-tab-nav {
  display: flex;
  gap: 4px;
  background-color: var(--mx-bg-tabs);
  border-radius: var(--mx-border-radius);
  padding: 4px;
  margin-bottom: 24px;
  border-bottom: none;
  /* Removed old border */
  scrollbar-width: none;
}

.mx-tab-nav::-webkit-scrollbar {
  display: none;
}

.mx-tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mx-text-light);
  border-radius: 8px;
  transition: all 0.25s ease;
}

.mx-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
  color: var(--mx-primary);
}

.mx-tab-btn.active {
  background-color: var(--mx-primary);
  color: #ffffff;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(3, 45, 107, 0.2);
}

.mx-tab-btn:focus-visible,
.mx-acc-head:focus-visible {
  outline: 2px solid var(--mx-primary);
  outline-offset: 2px;
}

.mx-tab-panel[hidden] {
  display: none;
}

.mx-tab-empty {
  padding: 18px;
  text-align: center;
  color: var(--mx-text-light);
}

/* ---- accordion ---- */
.mx-acc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mx-acc-item {
  background: var(--mx-bg-acc);
  border: none;
  /* Removed border to match flat design */
  border-radius: var(--mx-border-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.mx-acc-item.open {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.mx-acc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--mx-text-dark);
  text-decoration: none;
}

.mx-acc-head:hover {
  background: rgba(0, 0, 0, 0.02);
  text-decoration: none;
}

.mx-acc-title {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.6;
}

/* Chevron Icon */
.mx-acc-icon {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-inline-start: 8px;
  /* Space from text */
  border-inline-end: 2px solid var(--mx-text-light);
  border-bottom: 2px solid var(--mx-text-light);
  transform: rotate(45deg);
  /* Points down */
  transition: transform 0.3s ease;
}

.mx-acc-item.open .mx-acc-icon {
  transform: rotate(-135deg);
  /* Points up */
  border-color: var(--mx-primary);
  /* Optional: Darkens when open */
}

/* Link icon replacement */
.mx-acc-icon-link {
  border: 0;
  width: auto;
  height: auto;
  transform: none;
}

.mx-acc-icon-link:before {
  content: "\2197";
  color: var(--mx-text-light);
  font-size: 16px;
}

/* ---- opened content ---- */
.mx-acc-body {
  max-width: var(--mx-body-max-width);
  padding: 0 16px 16px;
  border-top: none;
  color: var(--mx-text-light);
  font-size: 14px;
  line-height: 1.8;
}

.mx-acc-body[hidden] {
  display: none;
}

.mx-acc-loading {
  padding: 12px;
  color: var(--mx-text-light);
  text-align: center;
}

/* ---- Rich text inside body ---- */
.mx-editor {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.9;
  text-align: justify;
}

.mx-editor * {
  max-width: 100%;
  box-sizing: border-box;
}

.mx-editor img,
.mx-editor video,
.mx-editor iframe {
  max-width: 100% !important;
  height: auto;
  border-radius: 8px;
}

.mx-acc-lead {
  flex: 0 0 auto;
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: var(--mx-primary);
}

.mx-acc-lead svg {
  width: 100%;
  height: 100%;
}