/* Global box-sizing */
* {
  box-sizing: border-box;
}

/* General layout and resets */
.col-sm-4 {
  padding: 8px !important;
  margin-top: -8px !important;
}

/* Card styling for boxes and tables */
.card {
  border-radius: 4px !important;
  background-color: #d2d2d2 !important;
  color: #d2d2d2 !important;
}

/* Header styling */
header {
  background-color: #202024 !important;
  border-bottom: 1px solid #51535a !important;
  margin: 0 !important;
  min-height: 52px !important;
  max-height: 52px !important;
}

/* Sidebar and control bar transitions */
.sidebar,
.FilterSidebar {
  transition:
    transform 0.3s ease-in-out,
    width 0.3s ease-in-out;
}

/* Content area transition for margin adjustments */
.main-content {
  transition:
    margin-left 0.3s ease-in-out,
    opacity 0.3s ease-in-out;
}

/* Body and content background */
body {
  background-color: #323239 !important;
  color: #d2d2d2 !important;
  overflow-x: hidden !important;
}

/* Main content styling */
.main-content {
  color: #d2d2d2 !important;
  background-color: #313339 !important;
  z-index: 10;
  overflow-x: hidden !important;
}

/* Main content headers */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
  padding: 2px !important;
  border-top-left-radius: 4px !important;
  border-top-right-radius: 4px !important;
  color: #6ab532 !important;
}

.main-content label {
  color: #d2d2d2 !important;
}

/* Sidebar styling */
.sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 52px);
}

.sidebar a,
.sidebar button {
  color: #d2d2d2 !important;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar a:hover,
.sidebar a:focus,
.sidebar button:hover,
.sidebar button:focus {
  background-color: #6ab532 !important;
  color: #d2d2d2 !important;
}

.sidebar a.active {
  background-color: #6ab532 !important;
  color: #d2d2d2 !important;
}

/* Sidebar icon centering when collapsed */
.sidebar .fa-solid {
  display: inline-block;
  width: 20px;
  text-align: center;
}

/* Sidebar list styling */
.sidebar ul {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Input and textarea styling */
input,
textarea {
  background-color: #323239 !important;
  color: #5fc200 !important;
  border: 1px solid #dddddd !important;
  border-radius: 4px;
}

input:hover,
textarea:hover,
input:focus,
textarea:focus {
  background-color: #323239 !important;
  border-color: #5fc200 !important;
  color: #5fc200 !important;
  outline: none;
}

/* Checkbox styling */
input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #d2d2d2;
  border-radius: 3px;
  background-color: #323239;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: #6ab532;
  border-color: #6ab532;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}

/* Button styling */
button.bg-\[\#81A372\] {
  background-color: #81a372 !important;
  color: #ffffff !important;
  border: 1px solid #81a372 !important;
  border-radius: 4px;
  transition: background-color 0.2s;
}

button.bg-\[\#81A372\]:hover,
button.bg-\[\#81A372\]:active {
  background-color: #6ab532 !important;
  border-color: #6ab532 !important;
}

/* Table styling */
table {
  background-color: #313339 !important;
  color: #d2d2d2 !important;
  table-layout: auto;
  width: 100%;
}

table thead tr {
  background-color: #51535a !important;
  color: #d2d2d2 !important;
}

table tbody tr {
  border-top: 1px solid #51535a !important;
}

/* Ensure table cells align properly */
table th,
table td {
  padding: 4px !important;
  text-align: left !important;
  vertical-align: middle !important;
}

/* Table container for horizontal scrolling */
.overflow-x-auto {
  overflow-x: auto;
  width: 100%;
}

/* Value boxes */
.value-box {
  background-color: #d2d2d2 !important;
  color: #51535a !important;
}

/* Data table box */
.data-table-box {
  background-color: #d2d2d2 !important;
  color: #51535a !important;
}

/* Separator in control bar */
hr {
  border: 0;
  border-top: 1px solid #81a372;
}

/* Font Awesome icons alignment */
.fa-solid {
  width: 20px;
  text-align: center;
}

/* Policy page header dropdown styling */
.policy-header select {
  background-color: #323239;
  color: #d2d2d2;
  border: 1px solid #81a372;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
}

.policy-header select:hover {
  background-color: #6ab532;
}

/* Search dropdown styling */
.search-dropdown {
  width: 100%;
  left: 0;
}

/* User dropdown styling */
.user-dropdown {
  background-color: #51535a;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  min-width: 150px;
}

.user-dropdown li {
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-dropdown li:hover {
  background-color: #6ab532;
}

/* Terms of Service link styling */
.tos-link {
  color: #d2d2d2 !important;
  text-decoration: underline;
  transition: color 0.2s;
}

.tos-link:hover {
  color: #6ab532 !important;
}

/* Logo styling */
img[src$="MM_Full.svg"],
img[src$="MM_Simple.svg"] {
  height: 24px;
  /*min-height: 24px;*/
  max-height: 24px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Mobile-specific styles */
@media (max-width: 640px) {
  .main-content {
    margin-left: 0 !important;
  }

  .sidebar {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100% !important;
  }

  .sidebar .flex-1 {
    overflow-y: auto;
  }

  table th,
  table td {
    padding: 2px !important;
  }

  .value-box {
    padding: 2px !important;
  }
}
