:root {
  --gray-100: #f2f3f4;
  --gray-200: #dbdee1;
  --gray-300: #c5c9ce;
  --gray-400: #aeb4bb;
  --gray-500: #989fa8;
  --gray-600: #818a95;
  --gray-700: #6a7481;
  --gray-800: #535f6e;
  --gray-900: #3b444b;
}
[data-bs-theme="light"] .astroid-framework {
  --as-header-bg: var(--gray-900);
  --as-header-text-color: var(--gray-100);
  --as-mobile-menu-icon-color: var(--gray-100);
  --as-mobilemenu-menu-icon-color: var(--gray-100);
  --as-mobile-menu-text-color: var(--gray-900);
  --as-main-menu-link-color: var(--bs-gray-100);
  --as-main-menu-link-hover-color: var(--bs-gray-100);
  --as-main-menu-link-active-color: var(--bs-gray-100);
  --as-stick-header-menu-link-color: var(--bs-gray-100);
  --as-stick-header-menu-link-active-color: var(--bs-gray-100);
  --as-stick-header-mobile-menu-icon-color: var(--gray-100);
  --as-stick-header-bg-color: var(--gray-900);
  --bs-link-color: #285fa5;
  --bs-link-hover-color: #377ed7;
  --bs-heading-color: var(--gray-900);
  --bs-emphasis-color: var(--gray-900);
  --bs-body-color: var(--gray-900);
  --bs-border-color: var(--gray-700);
  --pm-red: #d32f2f;
  --pm-green: #00a70d;
  --pm-orange: #9f6e3d;
  --pm-yellow: #fffce0;
  --pm-blue: #5dade2;
  --pm-black: var(--gray-900);
  --pm-gray: var(--gray-700);
}

[data-bs-theme="dark"] .astroid-framework {
  --bs-link-color: #3d81d9;
  --bs-link-hover-color: #84c1ff;
  --bs-heading-color: var(--gray-200);
  --bs-emphasis-color: var(--gray-200);
  --bs-body-color: var(--bs-gray-300);
  --bs-border-color: var(--gray-400);
  --pm-red: #d36b6b;
  --pm-green: #a2c9a4;
  --pm-yellow: #504a23;
  --pm-orange: var(--gray-200);
  --pm-black: var(--gray-200);
  --pm-gray: var(--gray-400);
}

/* STRUCTURE */
.astroid-component-section { padding: 1rem 0; }

/* GLOBAL */
::selection { background-color: var(--bs-link-color); }
.red, .red a { color: var(--pm-red) !important; }
.green, .green a { color: var(--pm-green) !important; }
.orange, .orange a { color: var(--pm-orange) !important; }
.black, .black a { color: var(--pm-black) !important; }
.gray, .gray a { color: var(--pm-gray) !important; }
.bg-yellow { background: var(--pm-yellow) !important; }
.row { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
.disabled { opacity: .75; }
.fs-105 { font-size: 1.05rem !important; }
.fs-095 { font-size: 0.95rem !important; }
.fs-090 { font-size: 0.9rem !important; }
.fs-085 { font-size: 0.85rem !important; }
.fw-bold, b, strong { font-weight: 500 !important; }
.fw-bolder { font-weight: 600 !important; }
hr { margin: 0.35rem 0; }
p { margin-bottom: 0.65rem; line-height: 1.6; }
p a { font-weight: 600 !important; }
[data-bs-theme="light"] .border-light { border-color: var(--gray-200) !important; }
[data-bs-theme="dark"] .border-light { border-color: var(--gray-900) !important; }

/* HEADERS */
@media (max-width: 1200px) {
  h1 { font-size: 1.65rem !important; }
  h2 { font-size: 1.45rem !important; }
  h3 { font-size: 1.25rem !important; }
  h4 { font-size: 1.1rem !important; }
}
h1, .h1 { margin-bottom: 1rem; line-height: 2rem !important; }
h2, .h2, h3, .h3, h4, .h4 { margin-bottom: 0.5rem; line-height: 1.75rem !important; }
h1, .h1, h2, .h2 { margin-top: 0.5rem; }
h5, .h5, h6, .h6 { margin-bottom: 0.15rem; margin-top: 0.65rem; }
:is(h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5) a { font-weight: 600 !important; }

/* MENU */
.astroid-nav { border-bottom: 1px solid transparent; }
.astroid-nav .nav-link.active,
.astroid-nav .nav-link:hover,
.astroid-nav .nav-link:focus { border-bottom: 1px solid; border-image-source: linear-gradient( to right, transparent, var(--gray-300), transparent ); border-image-slice: 1; }

/* MENU content area */
.sidebar-right .mod-list,
.astroid-component-area .mod-list { padding-inline-start: 1.25rem; list-style: disc; }
.sidebar-right .mod-list li,
.astroid-component-area .mod-list li { margin-top: 0.1rem !important; margin-bottom: 0.1rem !important; }

/* OFF CANVAS */
.astroid-offcanvas .astroid-offcanvas-inner { padding: 0 1rem; }

/* FORMS */
.form-check-input:checked { background-color: var(--bs-link-color); border-color: var(--bs-link-color); }
.choices__list--multiple .choices__item { color: var(--gray-900); background-color: var(--gray-100); border-radius: 1rem; border: 1px solid var(--gray-300); }
textarea { border: 1px solid var(--bs-border-color) !important; }
[data-bs-theme="light"] .form-check-label { color: var(--gray-900); }
[data-bs-theme="dark"] .form-check-label { color: var(--bs-gray-300); }

/* TABLES */
table a { color: var(--gray-900); }
table a:hover { color: var(--bs-link-color); }
[data-bs-theme="dark"] table a { color: var(--bs-gray-300); }
[data-bs-theme="dark"] table a:hover { color: var(--bs-link-color); }
.table>:not(caption)>*>* { background-color: unset; }
table tbody td { vertical-align: middle; }

/* TABLE LG */
table.table-lg { border: 1px solid var(--gray-200); margin-top: 1rem; }
table.table-lg thead th { background: var(--bs-gray-200); color: var(--gray-900); border: 1px solid var(--gray-200); vertical-align: bottom; padding: 0.4rem !important; height: 3rem; }
table.table-lg tfoot tr { text-transform: uppercase; }
table.table-lg tfoot td { padding: 0.4rem; background: var(--gray-400); color: var(--gray-900); }
table.table-lg tfoot td,
table.table-lg tbody td { padding: 0.4rem; height: 3rem; }
table.table-lg tbody td.lead { font-size: 1rem; font-weight: 600; }
table.table-lg tbody tr::before, table.sortable td { border: 1px solid var(--gray-200); }
.table-lg { position: relative !important; border-collapse: collapse !important; }
.table-lg th,
.table-lg thead tr:before { position: sticky; top: -1px; } /*  top: 3.9rem; */
[data-bs-theme="dark"] table.table-lg thead th { background: var(--bs-gray-700); color: var(--gray-200); border: 1px solid var(--gray-800); }
[data-bs-theme="dark"] table.table-lg tbody tr::before,
[data-bs-theme="dark"] table.sortable td { border: 1px solid var(--bs-gray-800); }

/* TABLE SM - FRONT PAGE */
.table-sm>:not(caption)>*>* { padding: 0 .25rem }
.table-sm th { font-size: 0.95rem !important; }
.table-sm td { font-size: 0.90rem !important; }
[data-bs-theme="light"] .table-sm:not(caption)>*>* { border-bottom: 1px solid var(--gray-100); }
[data-bs-theme="dark"] .table-sm:not(caption)>*>* { color: var(--gray-100); border-bottom: 1px solid var(--gray-900); }

/* TABLE LEFT-HAND-HEADER */
.left-hand-header tbody { counter-reset: sortabletablescope; }
.left-hand-header thead tr::before { content: ""; display: table-cell; }
.left-hand-header tbody tr::before { counter-increment: sortabletablescope; display: table-cell; vertical-align: middle; }
table.table-sm.left-hand-header thead tr::before { width: 20px; }
table.table-lg.left-hand-header thead tr::before { width: 3rem; background: var(--bs-gray-200);}
table.table-sm.left-hand-header tbody tr::before { text-align: end; content: counter(sortabletablescope) '.'; }
table.table-lg.left-hand-header tbody tr::before { text-align: center; content: counter(sortabletablescope); }
table.table-sm.left-hand-header tbody tr::before,
table.table-lg.left-hand-header tbody tr::before { font-size: 0.85rem; color: var(--gray-400); }
[data-bs-theme="dark"] table.table-lg.left-hand-header thead tr::before { background: var(--bs-gray-700); border: 1px solid var(--gray-800); }

/* TABLE EXAMPLES AND RESULTS */
table.table-results th,
table.table-example th { background: var(--bs-gray-200); }
table.table-example th,
table.table-example td { padding: 0.25rem !important; }
table.table-results th,
table.table-results td { padding: 0.15rem 0.25rem !important; }
[data-bs-theme="dark"] table.table-results th,
[data-bs-theme="dark"] table.table-example th { background: var(--bs-gray-800); }

/* LATEST RESULTS - FRONT PAGE */
.table-results-fp>:not(caption)>*>* { padding: 0 .15rem; }
.table-results-fp td { font-size: 0.9rem !important; line-height: 1.35rem; border: none; }

/* RL TOOLTIPS */
[data-bs-theme="dark"] { --accordian-bg: var(--gray-900); }
[data-tooltips] { border-bottom: none; }
[data-tooltips-element=tooltip] [data-tooltips-element=content] img { max-height: 240px; }
[data-tooltips-element=tooltip] [data-tooltips-element=content] { background: var(--bs-body-bg); color: var(--bs-body-color): }
[data-tooltips-element=tooltip] { --title-background-color: var(--gray-900); --title-text-color: var(--gray-100); }
[data-bs-theme="dark"] [data-tooltips-element=tooltip] { --title-text-color: var(--gray-100); --border-color: var(--bs-gray-700); }
.rl-tooltip { border-bottom: 1px dashed var(--bs-gray-900); }

/* RL ACCORDIANS */
:root { --accordian-bg: var(--gray-100); }
[data-bs-theme="dark"] {--accordian-bg: rgb(from var(--gray-900) r g b / 0.4); }
[data-rlta-element=container] > [data-rlta-element=button] { background-color: var(--accordian-bg); padding: 0.2rem 0.4rem; border: none; }
[data-rlta-element=container] > [data-rlta-element=panel] { border: none; }
[data-rlta-element=container][data-rlta-state=ready][data-rlta-type=accordions] > [data-rlta-element=panel] { padding: 0.25em; }
[data-rlta-element=container][data-rlta-state=ready][data-rlta-type=accordions] > [data-rlta-element=panel] > [data-rlta-element=panel-content] { padding: 0.25em 0; }
[data-rlta-element=container][data-rlta-state=ready][data-rlta-type=accordions] > [data-rlta-element=button] > [data-rlta-element=heading] { font-size: 1rem; font-weight: 400; }
[data-rlta-element=container] > [data-rlta-element=button] { border-radius: 0.25rem; }

/* RL TABS */
:root {
  --tab-bg: var(--gray-100);
  --tab-border: var(--gray-400);
  --tab-hover-bg: var(--gray-200);
  --tab-hover-border: var(--gray-600);
  --tab-active-bg: var(--bs-gray-900);
  --tab-active-border: var(--bs-gray-900);
  --tab-active-text: var(--gray-100);
}
[data-bs-theme="dark"] {
  --tab-bg: var(--gray-900);
  --tab-border: var(--gray-900);
  --tab-hover-bg: var(--gray-700);
  --tab-hover-border: var(--gray-700);
  --tab-active-bg: var(--gray-700);
  --tab-active-border: var(--bs-gray-700);
  --tab-active-text: var(--gray-100);
}

/* REGULAR LABS - TABS */
/* 1. THE MAIN CONTAINER */
[data-rlta-element="container"][data-rlta-state="ready"][data-rlta-type="tabs"] {
  
  /* 2. TAB NAVIGATION (Button List) */
  & > [data-rlta-element="button-list"] {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 0.35rem;
    justify-content: normal;
    min-height: 2.25rem;
    margin-bottom: 0.35rem;

    /* Individual Tab Buttons */
    & > [data-rlta-element="button"] {
      display: flex; /* Changed to flex for better alignment */
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 1;
      padding: 0.45rem 0.15rem;
      border-radius: 0.2rem;
      background: var(--tab-bg);
      border: 1px solid var(--tab-border);
      transition: all 0.2s ease; /* Smooth hover transitions */

      /* Tab Text/Heading */
      & > [data-rlta-element="heading"] {
        font-size: 0.95rem;
        white-space: nowrap;
      }

      /* State: Hover */
      &:hover {
        background-color: var(--tab-hover-bg);
        border-color: var(--tab-hover-border);
      }

      /* State: Active (Not Closed) */
      &:not([data-rlta-state="closed"]) {
        background: var(--tab-active-bg);
        border-color: var(--tab-active-border);

        & > [data-rlta-element="heading"] {
          color: var(--tab-active-text);
        }

        /* Prevent active tab from changing on hover */
        &:hover {
          background: var(--tab-active-bg);
          border-color: var(--tab-active-border);
        }
      }
    }
  }

  /* 3. TAB PANELS (Content Area) */
  & > [data-rlta-element="panels"] {
    & > [data-rlta-element="panel"] {
      overflow: visible;

      /* State: Hidden Panel */
      &[data-rlta-state="closed"] {
        display: none;
        visibility: hidden;
      }

      /* Inner Panel Content */
      & > [data-rlta-element="panel-content"] {
        padding: 0.35rem 0;
      }
    }
  }
}

/* ICONS */
:root { --fa-color: var(--gray-400); }
[data-bs-theme="dark"] { --fa-color: var(--bs-gray-700); }
.fa-color, .fa-color a { color: var(--fa-color) !important; }

/* BADGE */
#latest_results .badge-factor { padding: 0.25rem; margin-left: 0.1rem; vertical-align: middle; }
.badge-factor { color: var(--gray-900); background-color: var(--bs-gray-200); }
[data-bs-theme="dark"] .badge-factor { background-color: var(--bs-gray-700); color: var(--bs-gray-400); }

/* BUTTONS */
.btn-success { --bs-btn-color: white; --bs-btn-hover-color: white; }
[data-bs-theme="light"] .btn-secondary {
    --bs-btn-color: var(--gray-900);
    --bs-btn-hover-color: var(--gray-900);
    --bs-btn-bg: var(--gray-100);
    --bs-btn-hover-bg: var(--gray-200);
    --bs-btn-border-color: var(--gray-400);
    --bs-btn-hover-border-color: var(--gray-600);
    --bs-btn-active-color: var(--gray-900);
    --bs-btn-active-bg: var(--gray-300);
    --bs-btn-active-border-color: var(--gray-600);
    --bs-btn-disabled-color: var(--gray-900);
    --bs-btn-disabled-bg: var(--gray-300);
    --bs-btn-disabled-border-color: var(--gray-500);
}
[data-bs-theme="dark"] .btn-secondary {
    --bs-btn-color: var(--gray-100);
    --bs-btn-bg: var(--gray-900);
    --bs-btn-hover-color: var(--gray-100);
    --bs-btn-hover-bg: var(--gray-700);
    --bs-btn-disabled-bg: var(--bs-gray-900);
    --bs-btn-disabled-color: var(--bs-gray-100);
}

/* CARD */
.card,
.article-wraper-inner { --bs-card-spacer-y: 0.5rem; --bs-card-spacer-x: 0.5rem; }
.card-header { padding: 0.65rem 0.65rem 0.65rem; background: var(--gray-900); }
[data-bs-theme="light"] .card-header { color: var(--gray-100); }
[data-bs-theme="dark"] .card-header { color: var(--bs-gray-100); }

/* FOOTER */
.astroid-footer-section { background: var(--gray-900); color: var(--gray-100); }
.astroid-footer-section a,
.astroid-footer-section h3 { color: var(--bs-gray-100); }
.astroid-footer-section p>a { color: var(--pm-blue); }

@media (min-width: 992px) {
    .g-lg-4,
    .gx-lg-4 {
        --bs-gutter-x: 0.5rem;
    }
}

@media (min-width: 1200px) {
    .g-xl-5,
    .gx-xl-5 {
        --bs-gutter-x: 0.75rem;
    }
}

@media (min-width: 1400px) {
    .g-xxl-5,
    .gx-xxl-5 {
        --bs-gutter-x: 1rem;
    }
}