/* Base colors for Mothership */
:root {
  --mothership-alien-green: #00ff00;
}

/* Header colors */
h1,
h2,
h3,
h4,
h5,
h6,
.breadcrumb,
.breadcrumb-item {
  color: var(--detectit-primary-red);
}

.modal-backdrop {
  --bs-backdrop-opacity: .5;
  background-color: rgba(0,0,0,.5) !important;
}

.icon {
  width: 50px;
  height: 50px;
}

.fab {
  color: var(--detectit-white);
  background-color: var(--detectit-main-grey) !important;
}

.form-label {
  color: var(--detectit-primary-red);
}

/* Theme-based styles */
body[data-bs-theme="dark"] {
  background-color: #333 !important;
  color: var(--detectit-white);
}

body[data-bs-theme="light"] {
  background-color: var(--detectit-light-bg) !important;
  color: var(--detectit-black);
}

body[data-bs-theme="dark"] .product-description{
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .product-description{
  color: var(--detectit-black);
}

body[data-bs-theme="dark"] .modal-content,
body[data-bs-theme="dark"] .modal-content.product-description {
  background-color: var(--detectit-main-grey);
  border: 1px solid var(--mothership-alien-green);
}

body[data-bs-theme="dark"] .nav-item.active .nav-link,
body[data-bs-theme="light"] .nav-item.active .nav-link {
  color: var(--detectit-primary-red) !important;
}

/* Buttons */
body[data-bs-theme="dark"] .btn,
body[data-bs-theme="light"] .btn {
  background-color: var(--detectit-primary-red);
  color: var(--detectit-white);
  border-color: var(--mothership-alien-green);
}

body[data-bs-theme="light"] .btn {
  border-color: var(--detectit-black);
}

/* btn-warning */
body[data-bs-theme="dark"] .btn-warning,
body[data-bs-theme="light"] .btn-warning {
  background-color: var(--detectit-orange);
  color: var(--detectit-white);
}

/* list-group-item-primary */
body[data-bs-theme="dark"] .list-group-item-primary {
  background-color: var(--detectit-main-grey);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .list-group-item-primary {
  background-color: var(--detectit-orange);
  color: var(--detectit-white);
}

/* product-list li with the class of product-selected */
body[data-bs-theme="dark"] li.product-selected,
body[data-bs-theme="dark"] .product-selected-special {
  background-color: var(--detectit-main-grey);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] li.product-selected,
body[data-bs-theme="light"] .product-selected-special {
  background-color: var(--detectit-primary-red);
  color: var(--detectit-white);
}

/* Hyperlinks */
body[data-bs-theme="dark"] a,
body[data-bs-theme="light"] a {
  color: var(--detectit-primary-red);
  transition: color 0.3s;
}

body[data-bs-theme="light"] a:hover {
  color: var(--detectit-black);
}

body[data-bs-theme="dark"] a:hover {
  color: var(--mothership-alien-green);
}

/* a .fab */
body[data-bs-theme="dark"] a.fab,
body[data-bs-theme="light"] a.fab {
  color: var(--detectit-white);
  background-color: var(--detectit-main-grey);
  text-decoration: none;
}

body[data-bs-theme="dark"] i,
body[data-bs-theme="light"] i {
  color: var(--detectit-white);
  text-decoration: none;
}

/* for the i on dropdown items inside of the user profile dropdown */
body[data-bs-theme="dark"] #user-profile-dropdown .dropdown-item i {
  color: var(--detectit-white);
}
body[data-bs-theme="light"] #user-profile-dropdown .dropdown-item i {
  color: var(--detectit-black);
}

/* caption */
body[data-bs-theme="dark"] .caption {
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .caption {
  color: var(--detectit-light-nav-bg);
}

/* textarea */
body[data-bs-theme="light"] textarea {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
  border-color: var(--detectit-black);
}

body[data-bs-theme="dark"] textarea {
  background-color: var(--detectit-black);
  color: var(--mothership-alien-green);
  border-color: var(--mothership-alien-green);
}

/* input field colors */
body[data-bs-theme="dark"] input{
  background-color: var(--detectit-black);
  color: var(--mothership-alien-green);
  border-color: var(--mothership-alien-green);
}

/* disabled input field colors */
body[data-bs-theme="dark"] input:disabled {
  background-color: var(--detectit-main-grey);
  color: var(--detectit-white);
  border-color: var(--detectit-white);
}

body[data-bs-theme="light"] input {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
  border-color: var(--detectit-black);
}

/* disabled input field colors */
body[data-bs-theme="light"] input:disabled {
  background-color: var(--detectit-light-nav-bg);
  color: var(--detectit-black);
  border-color: var(--detectit-black);
}

/* input field placeholder colors */
body[data-bs-theme="dark"] input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

body[data-bs-theme="light"] input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* <option value="10">10</option> of select styling */
body[data-bs-theme="dark"] select {
  background-color: var(--detectit-black);
  color: var(--mothership-alien-green);
  border-color: var(--mothership-alien-green);
}

body[data-bs-theme="light"] select {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
  border-color: var(--detectit-black);
}

/* disabled select styling */
body[data-bs-theme="dark"] select:disabled {
  background-color: var(--detectit-main-grey);
  color: var(--detectit-white);
  border-color: var(--detectit-white);
}

body[data-bs-theme="light"] select:disabled {
  background-color: var(--detectit-light-nav-bg);
  color: var(--detectit-black);
  border-color: var(--detectit-black);
}

/* select option styling */
body[data-bs-theme="dark"] option {
  background-color: var(--detectit-black);
  color: var(--mothership-alien-green);
}

body[data-bs-theme="light"] option {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

/* Tables */
body[data-bs-theme="dark"] .table,
body[data-bs-theme="light"] .table {
  background-color: var(--detectit-black);
  color: var(--mothership-alien-green) !important;
}

body[data-bs-theme="light"] .table {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

/* Table headers */
body[data-bs-theme="dark"] .table th,
body[data-bs-theme="light"] .table th {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

/* Table rows */
body[data-bs-theme="dark"] .table tr {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .table tr {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}



/* eula-content */
body[data-bs-theme="dark"] .eula-content,
body[data-bs-theme="dark"] .sticky-text-bottom {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .eula-content,
body[data-bs-theme="light"] .sticky-text-bottom {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

/* lightbox-img means white background with drop shadow */
.lightbox-img {
  background-color: var(--detectit-white);
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.5);
}

/* jiggle animation for fab */
@keyframes jiggle {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.fab.jiggle {
  animation: jiggle 0.5s infinite;
}

/* badge and badge-profile */
.badge-profile {
  background-color: var(--detectit-light-nav-bg);
  color: var(--detectit-white);
  padding: 0.75em;
}

.badge-profile.badge-admin {
  background-color: var(--detectit-orange);
}

#cart-panel {
  display: none;
  position: absolute;
  bottom: 50px; /* Adjust as needed */
  right: 0;
  background-color: white;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-width: 300px;
}

#cart-panel.show {
  display: block;
}

.cart-panel-item-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  max-width: 300px;
  margin: 10px;
}

.cart-panel-item-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

/*this is a ul*/
#cart-panel-item-addons {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* color for the cart panel */
body[data-bs-theme="dark"] #cart-panel {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] #cart-panel {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

#token-quote-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  list-style-type: none;
  padding: 0;
}

#token-quote-list li {
  list-style-type: none;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
}

.gallery-label {
  border: 4px solid var(--detectit-primary-red);
  padding: 10px;
  margin: 0 auto;
  border-radius: 5px;
  box-shadow: -4px 4px 2px rgba(0, 0, 0, 0.2); /* creates a modern 3D effect */
}

body[data-bs-theme="dark"] #add-on-gallery h2 {
  /* Dark theme specific styles */
  background-color: rgba(25, 25, 25, 0.5); /* Translucent dark background */
  color: rgba(255, 23, 0, 0.8); /* Translucent primary red */
}

body[data-bs-theme="light"] #add-on-gallery h2 {
  /* Light theme specific styles */
  background-color: rgba(248, 249, 250, 0.5); /* Translucent light background */
  color: rgba(255, 23, 0, 0.8); /* Translucent primary red */
}

/* img inside of that h2 should be limited in max height */
#add-on-gallery h2 img {
  max-height: 75px;
}

/* addon-card card-header */
.add-on-header {
  display: flex;
  direction: row;
  justify-content: space-between;
  align-items: center;
}

.add-on-title {
  /* NO text wrap for the whole span, not even at spaces */
  white-space: pre;
}

/* loading-div modal has highest possible z-index */
#loading-div {
  z-index: 999999;
}

.loading-modal{
  z-index: 999999;
}

.pii-container{
  filter: blur(5px);
  transition: filter 0.5s;
}

body[data-bs-theme="dark"] #user-profile-link {
  color: var(--detectit-white);
}

/* dropdown-menu */
body[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .dropdown-menu {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

/* dropdown-item */
body[data-bs-theme="dark"] .dropdown-item {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .dropdown-item {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

/* carousel-control-prev */
body[data-bs-theme="dark"] .carousel-control-prev {
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .carousel-control-prev {
  color: var(--detectit-black);
}

/* carousel-control-next */
body[data-bs-theme="dark"] .carousel-control-next {
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .carousel-control-next {
  color: var(--detectit-black);
}

/* accordion stuff */
body[data-bs-theme="dark"] .accordion-button {
  background-color: var(--detectit-black);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .accordion-button {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

body[data-bs-theme="dark"] .accordion-button::after {
  background-color: var(--detectit-main-grey);
  color: var(--detectit-white);
}

body[data-bs-theme="light"] .accordion-button::after {
  background-color: var(--detectit-white);
  color: var(--detectit-black);
}

body[data-bs-theme="dark"] .accordion-body {
  background-color: var(--detectit-black) !important;
  color: var(--detectit-white) !important;
}

body[data-bs-theme="light"] .accordion-body {
  background-color: var(--detectit-white) !important;
  color: var(--detectit-black) !important;
}

/* Distinct colors for main headers and add-on items */
body[data-bs-theme="light"] .accordion-button.main-product {
  background-color: var(--detectit-orange) !important;
  color: var(--detectit-white) !important;
}
body[data-bs-theme="dark"] .accordion-button.main-product {
  background-color: var(--detectit-main-grey) !important;
  color: var(--detectit-white) !important;
}

/* Ensure selected main headers visibly override base main color */
body[data-bs-theme="light"] .accordion-button.main-product.product-selected,
body[data-bs-theme="light"] .accordion-button.main-product.product-selected-special {
  background-color: var(--detectit-primary-red) !important;
  color: var(--detectit-white) !important;
}
body[data-bs-theme="dark"] .accordion-button.main-product.product-selected,
body[data-bs-theme="dark"] .accordion-button.main-product.product-selected-special {
  background-color: var(--detectit-primary-red) !important;
  color: var(--detectit-white) !important;
}

/* Two-pane grid layout for Manage Products */
#manage-products {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
  /* Fill viewport below the header/breadcrumb; tweak if needed */
  height: calc(100vh - 160px);
}
#manage-products .pane {
  overflow: auto;
}

/* Make sidebar headers tidy */
#manage-products aside h5,
#manage-products aside h6 {
  margin: 0.25rem 0;
}

/* On small screens, stack panes */
@media (max-width: 992px) {
  #manage-products {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Group filter buttons: make active state obvious */
body[data-bs-theme="light"] #group-filters .btn.active {
  background-color: var(--detectit-primary-red) !important;
  border-color: var(--detectit-primary-red) !important;
  color: var(--detectit-white) !important;
}
body[data-bs-theme="dark"] #group-filters .btn.active {
  background-color: var(--detectit-primary-red) !important;
  border-color: var(--detectit-primary-red) !important;
  color: var(--detectit-white) !important;
}

/* Optional: baseline for non-active outline buttons so they don’t look “solid” */
body[data-bs-theme="light"] #group-filters .btn {
  background-color: transparent !important;
  color: var(--detectit-main-grey);
  border-color: var(--detectit-light-grey);
}
body[data-bs-theme="dark"] #group-filters .btn {
  background-color: transparent !important;
  color: var(--detectit-white);
  border-color: #666;
}

/* Two-pane layout for Manage Email Templates */
#manage-email {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  height: calc(100vh - 240px);
}
#manage-email .pane { overflow: auto; min-height: 300px; }
@media (max-width: 992px) {
  #manage-email { grid-template-columns: 1fr; height: auto; }
}

/*
DO NOT TOUCH THIS!!!!

This is a fix for the issue where the page would be visible for a split second before the CSS is loaded.
YOU BREAK THIS, I WILL BREAK YOU!

- CS

html {
  visibility: visible;
  opacity: 1;
  transition: opacity 1.0s;
}
*/