/* Custom Theme */
:root {
  --bs-primary-bg-subtle: #e0ffde;
  --bs-secondary-bg-subtle: #fdf9ca;
  --bs-primary-rgb: 0, 96, 57;
  --bs-secondary-rgb: 206, 196, 67;
  --table-border-radius: 0.5rem;

  --theme-b4d-color: #1482eb;

  --theme-t12b-color: #3cc25a;
  --theme-t12b-b2d-color: #6ebd16;
  --theme-t12b-b3d-color: #2ca85c;
  --theme-t12b-b4d-color: #00966d;
  --theme-t12b-rnb-color: #ffa2f0;
  --theme-t12b-chance-color: #f17138;
}

.b4d {
  --game-color: var(--theme-b4d-color);
}

.t12b {
  --game-color: var(--theme-t12b-color);

  &.b2d {
    --theme-minigame-color: var(--theme-t12b-b2d-color);
  }

  &.b3d {
    --theme-minigame-color: var(--theme-t12b-b3d-color);
  }

  &.b4d {
    --theme-minigame-color: var(--theme-t12b-b4d-color);
  }

  &.rnb {
    --theme-minigame-color: var(--theme-t12b-rnb-color);
  }

  &.chance {
    --theme-minigame-color: var(--theme-t12b-chance-color);
  }
}

[data-bs-theme="light"] {
  --theme-follow-color: #fff;
  --theme-opposite-color: #000;
  --theme-dark-yellow: #f9cd0c;
  --theme-yellow: #fdf195;
  --theme-light-yellow: #fff9c3;
  --theme-dark-green: #80d38b;
  --theme-green: #cafac0;
  --theme-light-green: #e5ffdf;
  --theme-dark-blue: #89eeff;
  --theme-blue: #c0f6ff;
  --theme-light-blue: #ddffff;
  --theme-dark-orange: #FFD089;
  --theme-orange: #FFE2C3;
  --theme-light-orange: #FFEBDF;
  --theme-gray: #888;
  
  --theme-blue-4: #44e4ff;

  --theme-text: var(--theme-opposite-color);
  --theme-subtle-text: var(--bs-body-color);
  --theme-positive-text: #006039;
  --theme-negative-text: #ef5922;
  --theme-dark-positive-text: var(--theme-positive-text);
  --theme-dark-negative-text: var(--theme-negative-text);
  --theme-heading-color: #006039;

  --bs-border-color: #abaeb1;
}

[data-bs-theme="dark"] {
  --theme-follow-color: #000;
  --theme-opposite-color: #fff;
  --theme-dark-yellow: #c28b00;
  --theme-yellow: #d4a600;
  --theme-light-yellow: #e6be35;
  --theme-dark-green: #378641;
  --theme-green: #3aab3b;
  --theme-light-green: #63bf64;
  --theme-dark-blue: #00527b;
  --theme-blue: #0087c2;
  --theme-light-blue: #39a6d6;
  --theme-dark-orange: #924F00;
  --theme-orange: #C47E2D;
  --theme-light-orange: #D48931;
  --theme-gray: #888;

  --theme-text: var(--theme-opposite-color);
  --theme-subtle-text: var(--bs-body-color);
  --theme-positive-text: #b6fdb7;
  --theme-negative-text: #ffb3a6;
  --theme-dark-positive-text: #006039;
  --theme-dark-negative-text: #EF5922;
  --theme-heading-color: #00E487;
}

.text-bg-primary {
  color: var(--theme-text) !important;
  background-color: RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.table-primary {
  --bs-table-bg: var(--theme-dark-green);
  --bs-table-color: var(--theme-text);
}

table.table-theme-primary {
  >thead {
    --bs-table-bg: var(--theme-dark-green);
    --bs-table-color: var(--theme-text);
  }

  >tfoot {
    --bs-table-bg: var(--theme-dark-blue);
    --bs-table-color: var(--theme-text);
  }

  >thead {

    tr:first-of-type {

      &>th:first-child,
      >td:first-child {
        border-top-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-top-right-radius: var(--table-border-radius);
      }
    }
  }

  >tfoot {

    tr:last-of-type {

      &>th:first-child,
      >td:first-child {
        border-bottom-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-bottom-right-radius: var(--table-border-radius);
      }
    }
  }

  &.no-header>tbody {
    tr:first-of-type {

      &>th:first-child,
      >td:first-child {
        border-top-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-top-right-radius: var(--table-border-radius);
      }
    }
  }

  &.no-footer>tbody {
    tr:last-of-type {

      &>th:first-child,
      >td:first-child {
        border-bottom-left-radius: var(--table-border-radius);
      }

      &>th:last-child,
      >td:last-child {
        border-bottom-right-radius: var(--table-border-radius);
      }
    }
  }
}

table.dataTable.table-bordered th:last-child,
table.dataTable.table-bordered td:last-child {
  border-right: 1px solid var(--bs-table-border-color);
}

[data-bs-theme="light"] {
  --bs-heading-color: #006039;

  body {
    background: url('../images/AFB 3.png') repeat fixed center, linear-gradient(#FAF6D5, #FFF) no-repeat fixed center;
  }

  .btn-secondary {
    --bs-btn-border-color: #e9ecef;
  }
}

[data-bs-theme="dark"] {
  --bs-heading-color: #00E487;

  body {
    background: url('../images/AFB 3.png') repeat fixed center, linear-gradient(#363636, #000) no-repeat fixed center;
  }

  .btn-secondary {
    --bs-btn-border-color: #4e4e4e;
  }
}

#main-navbar.navbar.bg-primary {
  /* background-image: linear-gradient(#3c8b0d, #02c506 40%, #92ff85); */
  background-image: linear-gradient(#006039, #60C86E 80%);
}

#main-navbar.navbar,
#main-navbar.navbar .navbar-nav,
#main-navbar.navbar .navbar-toggler,
#main-navbar.navbar a:hover {
  --ext-text-outline-color: #005D15;
  --bs-navbar-brand-color: #FFDE59;
  --bs-navbar-active-color: #ccb249;
  --bs-nav-link-color: #FFDE59;
  --bs-navbar-color: #FFDE59;
  --bs-navbar-brand-hover-color: #ccb249;
  --bs-link-hover-color-rgb: #ccb249;
  --bs-nav-link-hover-color: #ccb249;
}

.btn {
  --bs-btn-disabled-opacity: 0.5;
}

.btn.btn-primary {
  background-image: linear-gradient(#71eb71, #20cd0b 60%, #249d16);
}

.btn-secondary {
  --bs-btn-color: #000;
  background-image: linear-gradient(#FEEC94, #F7C101);
}

.btn-info {
  --bs-btn-color: #fff;
  background-image: linear-gradient(#69b4ff, #137fe3 60%, #025cb1);
}

.btn.btn-success {
  background-image: linear-gradient(#22C885, #017948 80%);
}

.btn.btn-danger {
  background-image: linear-gradient(#FF3F3F, #920000 80%);
}

.bg-primary {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
  background-image: linear-gradient(#048200, #006039);
}

.text-primary{
  color: #006337;
}

.lang-textwrap{
  --lang-textwrap: wrap;
  text-wrap: var(--lang-textwrap);
}

[lang="zh"]{
  --lang-textwrap: nowrap;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: var(--bs-breadcrumb-divider, ">") /* rtl: var(--bs-breadcrumb-divider, "/") */;
}