/* Base */
/* ------------------------------------------------------------------------------------------------------------------ */
html, body {
  height: 100vh!important;
}

#mainContainer, #mainRow {
  height: 95vh;
}

/* Light/Dark mode toggle */
/*Simple css to style it like a toggle switch*/
/* ------------------------------------------------------------------------------------------------------------------ */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display:none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--bs-body-bg);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

em {
  margin-left: 10px;
  font-size: 1rem;
}

/* CSS Grid - Dashboard */
/* ------------------------------------------------------------------------------------------------------------------ */
.grid-container-dashboard {
  display: inline-grid;
  grid-template-columns: 1fr 1fr 1fr;
  /*grid-template-columns: auto auto;*/
  grid-template-rows: min-content;
  gap: 15px;
  padding: 15px;
  height: min-content;
  /*
  Ok so, the grid is contained inside a div that uses flexbox, so for some reason we need to add
  this to get grid working properly
  */
  /*flex: 1;*/
  /*flex-wrap: nowrap;*/
}

.grid-container {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: min-content;
  grid-gap: 15px;
  padding: 15px;
  height: min-content;
  /*
  Ok so, the grid is contained inside a div that uses flexbox, so for some reason we need to add
  this to get grid working properly
  */
  flex: 1;
  flex-wrap: nowrap;
}

.grid-container-nested {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: min-content;
  grid-gap: 15px;
  /*background-color: #2196f3;*/
  padding: 0;
}

.grid-container-nested-vertical {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: min-content min-content;
  grid-gap: 15px;
  padding: 0;
}

.grid-item {
  background-color: var(--bs-body-bg);
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  /*height: fit-content;*/
}

.grid-item-dashboard {
  background-color: var(--bs-body-bg);
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  min-width: 300px;
  /*height: fit-content;*/
}

.grid-button {
  background-color: var(--bs-body-bg);
  border-radius: 5px;
  padding: 20px;
  text-align: center;
}

.dashboard-value {
    font-size: 24px;
}

/* Sidebar - Bootstrap5 override */
/* ------------------------------------------------------------------------------------------------------------------ */
.nav-pills .nav-link {
  border-radius: 0;
  width: 100%;
}

/* Account Detail - Bootsrap5 override */
/* ------------------------------------------------------------------------------------------------------------------ */
#account-nav-tab > .active {
  background: var(--bs-tertiary-bg)!important;
  border-bottom-color: var(--bs-tertiary-bg)!important;
}

/* CSS Grid - Buttons */
/* ------------------------------------------------------------------------------------------------------------------ */
.grid-container-buttons {
  display: grid;
  grid-template-columns: 50% 50%;
  margin: 0;
}

.grid-item-buttons {
  text-align: center;
  padding: 5px;
}

.grid-container-crawl-detail {
  display: inline-grid;
  grid-template-columns: 1fr 1fr auto;
  grid-template-rows: min-content;
  grid-gap: 15px;
  padding: 5px 0 15px 0;
  height: auto;

  /*
  Ok so, the grid is contained inside a div that uses flexbox, so for some reason we need to add
  this to get grid working properly
  */
  flex: 1;
  flex-wrap: nowrap;
}

.grid-item-crawl-detail {
  border-radius: 5px;
  text-align: center;
  border: var(--border-alt-color) solid 1px;
}

#table-header {
  text-align: center;
  font-weight: normal;
  font-size: 14px;
  padding-top: 15px;
}

/* Dashboard - Blinking status dot */
/* ------------------------------------------------------------------------------------------------------------------ */
.dot {
  height: 15px;
  width: 15px;
  margin-left: 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #e2e2e2;
}

.dot-green {
    background-color: #5cb85c;
    border-color: #5cb85c;
}

.dot-yellow {
    background-color: #f0ad4e;
    border-color: #f0ad4e;
}

.dot-red {
    background-color: #d9534f;
    border-color: #d9534f;
}

/* Blinking light */
.Blink {
    animation: blinker 1.5s cubic-bezier(.5, 0, 1, 1) infinite alternate;
}

@keyframes blinker {
  from { opacity: 1; }
  to { opacity: 0.4; }
}

/* Datatables - Button group styling overrides */
/* ------------------------------------------------------------------------------------------------------------------ */
.btn-group-rounded-right {
  border-top-right-radius: inherit!important;
  border-bottom-right-radius: inherit!important;
}

.btn-group-rounded-left {
  border-top-left-radius: inherit!important;
  border-bottom-left-radius: inherit!important;
}

/*#productCrawlTable_wrapper .pagination {*/
/*  justify-content: center;*/
/*}*/

/* FullCalendar overrides */
/* ------------------------------------------------------------------------------------------------------------------ */
.fc-popover {
  background: var(--bs-body-bg)!important;
}

.linked-field:before {
  font-family: "Font Awesome 5 Free";
  content: "\f0c1";  /* Link */
  margin-left: -23px;
  padding-right: 3px;
  vertical-align: middle;
  font-weight: 900;
  color: cornflowerblue;
}

.filtered-field:before {
  font-family: "Font Awesome 5 Free";
  content: "\f0b0";  /* Filter */
  /*content: "\f023";  !* Lock *!*/
  margin-left: -23px;
  padding-right: 3px;
  vertical-align: middle;
  font-weight: 900;
  color: cornflowerblue;
}

/* ===== Collapsible sidebar (mini-rail) ===== */

/* Anchor for the absolute-positioned edge-tab toggle */
#sidebar {
  position: relative;
}

/* Narrow the sidebar to an icon-only rail */
#sidebar.collapsed {
  width: 60px;
  flex: 0 0 60px;
  overflow-x: hidden;
}

/* Hide all text labels — icons remain */
#sidebar.collapsed .nav-link span,
#sidebar.collapsed .navbar-brand div {
  display: none;
}

/* Hide accordions and dividers in rail mode */
#sidebar.collapsed .accordion {
  display: none;
}

/* Show collapsed-only items, hide expanded-only items */
#sidebar .collapsed-only { display: none !important; }
#sidebar .expanded-only { display: flex; }
#sidebar.collapsed .expanded-only { display: none; }
#sidebar.collapsed .collapsed-only { display: flex !important; }

/* Center remaining icons in the rail */
#sidebar.collapsed .nav-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

#sidebar .collapsed-only.active {
  background-color: var(--bs-primary);
  color: #fff !important;
  border-radius: var(--bs-border-radius);
  margin-left: 12px;
  margin-right: 12px;
}

/* ===== Toggle button ===== */

/* Expanded mode: subtle circular edge-tab pinned to the right border */
#sidebarToggle {
  position: absolute;
  top: 25px;
  right: 0;
  transform: translate(50%, -50%);
  z-index: 10;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  opacity: 0.75;
  transition: opacity 0.15s ease, background 0.15s ease;
}

#sidebarToggle:hover {
  opacity: 1;
  background: var(--bs-secondary-bg);
}

/* Collapsed mode: centered icon at top of rail (no edge-tab) */
#sidebar.collapsed #sidebarToggle {
  position: static;
  transform: none;
  margin: 12px auto 0;
}

/* Flip caret when collapsed */
#sidebar.collapsed #sidebarToggle i {
  transform: rotate(180deg);
}


/* ===== Nav buttons on landing pages ===== */

.nav-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}