/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
    background-color: #e6f9ec;
}

.btn-primary {
    background-color: #4caf50;
    border-color: #4caf50;
}

.navbar, .card {
    background-color: #f4fff7;
}

.text-primary {
    color: #388e3c !important;
}


/* Custom styles - loaded after Bootstrap */
.invalid-job {
  background-color: #dc3545 !important;
  color: white !important;
  border: 2px solid #b02a37 !important;
}

.list-group .list-group-item.invalid-job {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-color: #f5c6cb !important;
  border-left: 5px solid #dc3545 !important;
}

.list-group .list-group-item.invalid-job:hover {
  background-color: #f1b0b7 !important;
}

.whois-popover {
  max-width: 800px;
}

/* Passive/Active module tinting */
.list-group .list-group-item.module-passive {
  background-color: #eaf1fb;
}

.list-group .list-group-item.module-passive:hover {
  background-color: #dbe7f8;
}

.list-group .list-group-item.module-active {
  background-color: #fbeaea;
}

.list-group .list-group-item.module-active:hover {
  background-color: #f8dbdb;
}

.list-group .list-group-item.module-commercial {
  background-color: #fdf3d9;
}

.list-group .list-group-item.module-commercial:hover {
  background-color: #fbe8b8;
}

/* Domain tabs on the project page: header box contains the tab label plus
   its rescan/delete buttons, and stays visibly boxed even when inactive. */
.nav-tabs .nav-item {
  display: flex;
}

.domain-tab-header {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  margin-right: 4px;
  margin-bottom: -1px;
  border: 1px solid #c9d3dc;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  background-color: #e9ecef;
}

.domain-tab-header:hover {
  background-color: #dde2e7;
}

.domain-tab-header:has(.nav-link.active) {
  background-color: #fff;
  border-bottom-color: #fff;
  font-weight: 600;
}

.domain-tab-header:has(.nav-link.active):hover {
  background-color: #fff;
}

.domain-tab-header .nav-link {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 0.25rem 0 0 !important;
  background: transparent !important;
}

/* Grey out disabled or error modules */
.list-group .list-group-item.module-inactive {
  filter: grayscale(60%);
  opacity: 0.6;
}

.list-group .list-group-item.module-inactive:hover {
  opacity: 0.8;
}

/* Enhanced Sidebar Styles */
.sidebar {
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-sidebar-toggle {
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  transform: translateX(5px);
}

.btn-sidebar-toggle:focus {
  box-shadow: 0 0 0 0.25rem rgba(129, 199, 132, 0.4);
  color: white !important;
}

.nav-link-sidebar {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-link-sidebar:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateX(3px);
}

.nav-link-sidebar.active {
  color: white !important;
  background: rgba(255, 255, 255, 0.25) !important;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-chevron {
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.btn-sidebar-toggle[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(180deg);
}

/* Smooth collapse animations */
.collapse {
  transition: all 0.3s ease;
}

/* Badge styling */
.badge {
  font-size: 0.7rem;
  padding: 0.25em 0.5em;
}

/* Focus indicators for accessibility */
.nav-link-sidebar:focus,
.btn-sidebar-toggle:focus {
  outline: 2px solid #81c784;
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    min-height: auto !important;
  }
}