/* fix slider display */
.navbar-button{
  border-radius: 0.2rem;
}
.swiper{
  display: flex;
}
.swiper-slide{
  background-color: transparent;
  align-content: center;
}
/* Theme Variables */
:root {
  --background-color: rgb(245, 245, 250);
  --base-color: rgb(255, 255, 255);
  --font-color: rgb(20, 20, 20);
  --icon-color-header: #0056d2;
  --icon-card-color: #0056d2;
  --icon-card-bg: #e3eaf9;
  --muted-color: #606060;
}

.darkmode {
  --background-color: #121212;
  --base-color: rgb(33, 37, 41);
  --font-color: #eaeaea;
  --icon-color-header: #82b4ff;
  --icon-card-color: #ffffff;
  --icon-card-bg: #4571ec;
  --muted-color: #a3a3a3;
}

/* Base Styles */
body {
  font-family: 'Lexend';
  background-color: inherit;
}

i {
  color: var(--font-color);
}

a {
  color: var(--font-color);
  text-decoration: none;
  transition: hover ease-in 0.2s;
}

a:hover {
  color: rgb(80, 125, 240);
}

.text-muted {
  color: var(--muted-color) !important;
}

/* Tooltip */
.tooltip {
  z-index: 10000 !important;
  background-color: var(--base-color);
  color: var(--font-color);
}

/* Select2 */
.select2-container .select2-selection {
  background-color: var(--base-color) !important;
  color: var(--font-color) !important;
  border: none;
}

.select2-container .select2-selection__rendered {
  color: var(--font-color) !important;
}

.select2-dropdown {
  background-color: var(--base-color) !important;
}

.select2-results__option {
  color: var(--font-color) !important;
}

.select2-results__option--highlighted {
  background-color: #3561c1 !important;
  color: white !important;
}

.select2-search__field {
  color: var(--font-color);
  background-color: var(--base-color);
}

.select2-selection__arrow {
  border-top: 0.5rem solid var(--base-color);
}

.select2-selection__clear {
  color: var(--font-color) !important;
}

.select2-results__option[aria-disabled='true'] {
  color: #888 !important;
}

.select2-selection:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.select2-search__field:focus {
  border-color: var(--font-color);
  outline: none;
}

#sbapiform {
  background-color: var(--background-color) !important;
}

/* Buttons */
.primary-button {
  background-color: #4571ec;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.primary-button i {
  color: white;
  font-size: 1.2rem;
}

.primary-button span {
  color: white;
  margin-bottom: 0;
}

.primary-button:hover {
  background-color: #3561c1;
}

.primary-button:focus {
  outline: none;
}

.primary-button:active {
  transform: translateY(1px);
}

.secondary-button {
  background-color: #f1f3f8;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  border: 2px solid #4571ec;
  color: #4571ec;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.secondary-button i {
  color: #4571ec !important;
  font-size: 1.2rem;
}

.secondary-button span {
  color: #4571ec !important;
  margin-bottom: 0;
}

.secondary-button:hover {
  background-color: #4571ec !important;
  color: #fff !important;
}

.secondary-button:hover span,
.secondary-button:hover i {
  color: #fff !important;
}

.secondary-button:focus {
  outline: none;
}

.secondary-button:active {
  transform: translateY(1px);
}

/* Add Button */
.add-button {
  background-color: #28a745;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.add-button i {
  color: white !important;
  font-size: 1.2rem;
}

.add-button span {
  color: white !important;
  margin-bottom: 0;
}

.add-button:hover {
  background-color: #218838;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.add-button:focus {
  outline: none;
}

.add-button:active {
  transform: translateY(1px);
}

/* Remove Button */
.remove-button {
  background-color: #dc3545;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.remove-button i {
  color: white;
  font-size: 1.2rem;
}

.remove-button span {
  color: white;
  margin-bottom: 0;
}

.remove-button:hover {
  background-color: #c82333;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.remove-button:focus {
  outline: none;
}

.remove-button:active {
  transform: translateY(1px);
}

/* Load Button */
.load-button {
  background-color: #ffc107;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.load-button i {
  color: white;
  font-size: 1.2rem;
}

.load-button span {
  color: white;
  margin-bottom: 0;
}

.load-button:hover {
  background-color: #e0a800;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.load-button:focus {
  outline: none;
}

.load-button:active {
  transform: translateY(1px);
}

/* Loader */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite, colorChange 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes colorChange {
  0%, 100% {
    border-top-color: #3498db;
  }
  25% {
    border-top-color: #e74c3c;
  }
  50% {
    border-top-color: #2ecc71;
  }
  75% {
    border-top-color: #f39c12;
  }
}

/* Navbar and Sidebar */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  padding: 0.5rem 1rem;
  background-color: var(--base-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: margin-left 0.3s ease;
}

.sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  width: 110px;
  padding: 0.5rem;
  border: 0.05rem solid rgba(0, 0, 0, 0.1);
  background-color: var(--base-color);
  transition: width 0.3s ease;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: hidden;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  transform: translateY(-50%); /* Centers the sidebar vertically */
}

.sidebar.expanded {
  width: 250px;
}

.sidebar-nav {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 1.0rem 1.5rem;
  list-style: none;
}

.sidebar-item {
  margin: 0.525rem 0.125rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  font-size: 25px;
  text-decoration: none;
  color: var(--font-color);
  gap: 0.8rem;
  padding: 0.4rem 0.4rem;
  position: relative;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sidebar-link:hover {
  background-color: rgb(70, 120, 250);
  border-left: solid rgb(0, 72, 255);
  color: white !important;
  transform: translateX(0.25rem);
}

.sidebar-link span {
  font-size: 15px;
  color: var(--font-color);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  white-space: nowrap;
}

.sidebar-link:hover span {
  color: white !important;
}

.sidebar-link:hover i {
  color: white !important;
}

.sidebar.expanded .sidebar-link span {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

#toggle-sidebar {
  border: none;
  border-radius: 30%;
  background: transparent;
  outline: none;
  padding: 0.5rem 0.5rem;
  font-size: 30px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: none;
}

#toggle-sidebar:hover {
  background-color: #aebaff6c;
  transform: scale(110%);
}

#toggle-sidebar:focus {
  box-shadow: none; 
}

/* Show scrollbar on hover */
.sidebar:hover {
  overflow-y: auto;
}

/* Custom scrollbar styles */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(122, 122, 122, 0.8);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background-color: transparent;
}

.navbar-button {
  border: none;
  border-radius: 30%;
  background: transparent;
  outline: none;
  padding: 0.5rem 0.5rem;
  font-size: 25px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.navbar-button:hover {
  background-color: #aebaff6c;
  transform: scale(110%);
}

.navbar-button:focus {
  box-shadow: none; 
}

/* Public navbar links styling */
.navbar-nav .nav-item {
  position: relative;
}

.navbar-nav .nav-link {
  color: var(--font-color);
  font-weight: 500;
  font-size: 1rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #007bff;
  text-decoration: none;
}

/* Optional underline effect on hover */
.navbar-nav .nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s;
  margin-top: 3px;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Main Content and Footer */
.main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease-in-out; 
}

/* When sidebar is visible (user is logged in) */
.main-wrapper.sidebar-visible .main-content {
  margin-left: 110px; /* Space for the sidebar */
}

/* When sidebar is hidden (user is logged out) */
.main-wrapper.sidebar-hidden .main-content {
  margin-left: 0; /* No margin when sidebar is not rendered */
}

.main-content {
  margin-top: 90px;
  margin-left: 110px;
  padding: 1.1rem 1.1rem;
  transition: margin-left 0.3s ease-in-out; 
}

.footer {
  background-color: var(--base-color);
  padding: 2rem;
  text-align: center;
  border-top: 0.05rem solid rgba(0, 0, 0, 0.1);
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* When the sidebar is visible (logged-in state) */
.main-wrapper.sidebar-visible .footer {
  margin-left: 110px;  /* Adds space for the sidebar */
}

/* When the sidebar is hidden (logged-out state) */
.main-wrapper.sidebar-hidden .footer {
  margin-left: 0;  /* Footer expands to full width */
}

/* Responsive Styles */
.sidebar-phone {
  position: fixed;
  visibility: hidden;
  top: 0;
  bottom: 0;
  left: 0;
  width: 110px;
  margin-top: 60px;
  padding: 0.5rem;
  border: 0.05rem solid rgba(0, 0, 0, 0.1);
  background-color: var(--base-color);
  transition: width 0.3s ease;
  z-index: 9997;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Show scrollbar on hover */
.sidebar-phone:hover {
  overflow-y: auto;
}

.sidebar-phone .sidebar-nav {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 1.0rem 1.5rem;
  list-style: none;
  overflow-y: auto;
}

.sidebar-phone .sidebar-item {
  margin: 0.525rem 0.125rem;
}

.sidebar-phone .sidebar-link {
  display: flex;
  align-items: center;
  font-size: 25px;
  text-decoration: none;
  color: var(--font-color);
  gap: 0.8rem;
  padding: 0.4rem 0.4rem;
  position: relative;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sidebar-phone .sidebar-link:hover {
  background-color: rgb(70, 120, 250);
  border-left: solid rgb(0, 72, 255);
  color: white !important;
  transform: translateX(0.25rem);
}

.sidebar-phone .sidebar-link span {
  font-size: 15px;
  color: var(--font-color);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  white-space: nowrap;
}

.sidebar-phone .sidebar-link:hover span {
  color: white !important;
}

.sidebar-phone .sidebar-link:hover i {
  color: white !important;
}

.sidebar-phone.expanded .sidebar-link span {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .sidebar {
    width: 0;
    visibility: hidden;
    overflow: hidden;
    transition: width 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-phone {
    width: 0;
    visibility: hidden;
    overflow: hidden;
    transition: width 0.3s ease, visibility 0.3s ease;
  }

  #toggle-sidebar {
    display: inline;
  }

  .sidebar-phone.expanded {
    width: 100%;
    visibility: visible;
  }


  .top-navbar {
    margin-left: 0;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .main-wrapper.sidebar-visible .main-content {
    margin-left: 0;
  }

  .main-content {
    margin-left: 0;
  }

  .footer {
    margin-left: 0;
  }
}

/* Partner Logos */
.partner-logo {
  max-width: 100%; 
  height: auto;
  transition: transform 0.3s ease;
  display: block;
}

.partner-logo:hover {
  transform: scale(1.1);
}

/* Card Styles */
.card {
  background-color: var(--base-color);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.card-icons {
  font-size: 25px;
  color: var(--icon-card-color);
  background-color: var(--icon-card-bg);
  padding: 0.8rem;
  border-radius: 30%;
}

/* Card Header Icons */
.header-icon {
  font-size: 24px;
  margin-right: 10px;
  color: var(--icon-color-header);
}

.header-title {
  font-size: 18px;
  line-height: 1.2rem;
  color: var(--font-color);
}

/* Metar TAF */
#metartaf-Tgy4P6uh span {
  color: white !important; /* Force white text color */
}

/* Leaderboard Widget */
.lboard-one {
  background-color: rgba(250, 235, 175, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 0.8rem;
  transition: all 0.2s;
  display: inline-block;
}

.lboard-one span,
.lboard-one i {
  color: rgb(255, 170, 45) !important;
}

.lboard-one:hover {
  transform: scale(105%);
}

.lboard-two {
  background-color: rgba(235, 235, 235, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 0.8rem;
  transition: all 0.2s;
  display: inline-block;
}

.lboard-two span,
.lboard-two i {
  color: rgb(155, 155, 155) !important;
}

.lboard-two:hover {
  transform: scale(105%);
}

.lboard-thr {
  background-color: rgba(200, 140, 90, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 0.8rem;
  transition: all 0.2s;
  display: inline-block;
}

.lboard-thr span,
.lboard-thr i {
  color: rgb(170, 75, 0) !important;
}

.lboard-thr:hover {
  transform: scale(105%);
}

/* Download */
.list-group-item {
  background-color: var(--base-color);
  border-color: var(--background-color);
}

/* Modal */
.modal-body {
  background-color: var(--base-color) !important;
  outline-color: var(--font-color);
}

.modal-header {
  background-color: var(--base-color) !important;
  outline-color: var(--font-color);
}

.modal-footer {
  background-color: var(--base-color) !important;
  outline-color: var(--font-color);
}

/* Market */
/* General price tag styling */
.market-price {
  font-size: 1.2rem;
  color: #28a745;
  font-weight: bold;
  padding: 0.6rem 1rem;
  border: 1px solid #28a745;
  border-radius: 4px;
  background-color: #f0fff4;
}

/* Styling for "SOLD OUT" tag */
.market-sold {
  font-size: 1.2rem;
  color: #dc3545;
  font-weight: bold;
  padding: 0.6rem 1rem;
  border: 1px solid #dc3545;
  border-radius: 4px;
  background-color: #fff5f5;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-group-text i {
  color: black !important;
}

.a.link {
  color: #fff !important;
}

.a.link:hover {
  color: #0056d2 !important;
}