/*
 * 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.
 */

.pt-20 {
  padding-top: 20px !important;
}

/* Company Logo Styles */
.company-logo {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--bs-light-bg-subtle);
  flex-shrink: 0;
}

.company-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.company-name {
  font-size: 1rem;
  color: #495057;
}

/* Salary Transparency Display */
.salary-text {
  color: #198754 !important;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Larger salary text for job detail page */
.salary-text-lg {
  color: #198754 !important;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Mobile Filter Menu Styling */
/* stylelint-disable-next-line selector-id-pattern */
#mobileFilterMenu {
  max-width: 320px;
}

/* stylelint-disable-next-line selector-id-pattern */
#mobileFilterMenu .offcanvas-body {
  overflow-y: auto;
}

/* stylelint-disable-next-line selector-id-pattern */
#mobileFilterMenu .filter-panel {
  margin-bottom: 0;
}

/* stylelint-disable-next-line selector-id-pattern */
#mobileFilterMenu .filter-section:last-child {
  margin-bottom: 0;
}

/* Ghost Job Warning Styles - displayed as metadata item */
.ghost-job-metadata {
  cursor: help;
  font-size: 0.9rem !important;
  line-height: 1.3;
  font-weight: 600 !important;
}

/* Warning level colors */
.ghost-job-metadata.ghost-warning-low {
  color: var(--bs-secondary) !important;
}

.ghost-job-metadata.ghost-warning-medium {
  color: #b45309 !important; /* Amber/orange for warning */
}

.ghost-job-metadata.ghost-warning-high {
  color: var(--bs-danger) !important;
}

/* Hide stale jobs filter checkbox */
.ghost-filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.ghost-filter-option .form-check-input {
  margin-top: 0;
}

/* Skeleton Loading Styles */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200px 0;
  }

  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* stylelint-disable-next-line keyframes-name-pattern */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Skeleton shimmer effect - shared styles */
.skeleton-shimmer-bg {
  background: linear-gradient(
    90deg,
    var(--bs-secondary-bg) 0,
    var(--bs-light) 40px,
    var(--bs-secondary-bg) 80px
  );
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-loading-container {
  animation: fadeIn 0.2s ease-in;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-text {
  display: inline-block;
  height: 1em;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--bs-secondary-bg) 0,
    var(--bs-light) 40px,
    var(--bs-secondary-bg) 80px
  );
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--bs-secondary-bg) 0,
    var(--bs-light) 40px,
    var(--bs-secondary-bg) 80px
  );
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-badge {
  display: inline-block;
  width: 80px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--bs-secondary-bg) 0,
    var(--bs-light) 40px,
    var(--bs-secondary-bg) 80px
  );
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

/* Skeleton width utilities */
.skeleton-w-30 { width: 30%; }
.skeleton-w-40 { width: 40%; }
.skeleton-w-60 { width: 60%; }
.skeleton-w-80 { width: 80%; }
.skeleton-w-100 { width: 100%; }
.skeleton-w-80px { width: 80px; }
.skeleton-w-100px { width: 100px; }
.skeleton-w-120px { width: 120px; }

/* Smooth transition from skeleton to real results */
/* stylelint-disable-next-line selector-id-pattern */
#search_results {
  transition: opacity 0.2s ease-in-out;
}

#job-listings {
  animation: fadeIn 0.3s ease-in;
}

/* Company Profile Page */
.company-logo-placeholder {
  width: 80px;
  height: 80px;
}

/* Saved Search Limit Display */
.saved-search-limit {
  padding: 0.75rem;
  background-color: var(--bs-light);
  border-radius: 0.375rem;
  border: 1px solid var(--bs-border-color);
}

.saved-search-limit .badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.saved-search-limit .limit-reached-message .alert {
  font-size: 0.875rem;
}

.saved-search-limit .limit-reached-message .btn-link {
  font-weight: 500;
}

/* Locations expansion */
.locations-expanded {
  padding: 0.5rem;
  background-color: var(--bs-light);
  border-radius: 6px;
  margin-top: 0.5rem;
}

.locations-expanded ul {
  max-height: 200px;
  overflow-y: auto;
}

.locations-expanded li {
  padding: 0.25rem 0;
}

.locations-expanded li:hover {
  background-color: var(--bs-secondary-bg);
  border-radius: 4px;
}

/* stylelint-disable-next-line no-descending-specificity */
.locations-expanded a {
  color: var(--da-accent);
}

.locations-expanded a:hover {
  text-decoration: underline !important;
}

/* Early Applicant Badge Styles */

/* Using specific parent selectors to avoid !important */
.job-meta .early-applicant-badge,
.job-metadata .early-applicant-badge {
  cursor: help;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
}

/* Very high likelihood - green/success with lightning */
.job-meta .early-applicant-badge.early-applicant-very-high,
.job-metadata .early-applicant-badge.early-applicant-very-high {
  color: #198754; /* Bootstrap success green */
}

/* High likelihood - blue/primary */
.job-meta .early-applicant-badge.early-applicant-high,
.job-metadata .early-applicant-badge.early-applicant-high {
  color: #0d6efd; /* Bootstrap primary blue */
}

/* Medium likelihood - gray/secondary */
.job-meta .early-applicant-badge.early-applicant-medium,
.job-metadata .early-applicant-badge.early-applicant-medium {
  color: var(--bs-secondary);
}

/* DIR-80: Mobile bottom navigation
 * Fixed three-icon nav (Job Search / Alerts / Tracker) for signed-in users
 * on viewports smaller than the Bootstrap md breakpoint. Tap targets are
 * 44pt minimum (WCAG 2.5.5) and the safe-area-inset-bottom keeps the
 * iOS notch from overlapping the icons. */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: #ffffff;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav__item {
  flex: 1 1 0;
  min-height: 56px;
  min-width: 44px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #555;
  font-size: 0.7rem;
  line-height: 1.1;
  gap: 2px;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:focus {
  color: #121212;
  text-decoration: none;
}

.mobile-bottom-nav__item.is-active {
  color: #454fff;
}

.mobile-bottom-nav__icon {
  font-size: 1.25rem;
}

.mobile-bottom-nav__label {
  white-space: nowrap;
}

/* Reserve space at the page bottom on mobile so fixed content (footer,
 * empty-state CTAs) isn't covered by the bottom nav. */
@media (max-width: 767.98px) {
  body.has-mobile-bottom-nav {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
  }
}
