/* Design System - Search Mission Page */

/* ============================================
   SEARCH MISSION LAYOUT
   ============================================ */

.ds-search-mission-wrapper {
  min-height: 100vh;
  background-color: #F9FAFB;
}

.ds-search-mission-main {
  padding: 3rem 0 6rem 0;
}

.ds-search-mission-container {
  display: flex;
  max-width: 1280px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.ds-search-mission-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

/* ============================================
   APPLIED FILTERS
   ============================================ */

.ds-applied-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.ds-filter-badge-removable {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  background-color: #ffffff;
  border: 1px solid #E5E7EB;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.ds-filter-badge-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.2s;
}

.ds-filter-badge-remove:hover {
  color: #111827;
}

.ds-filter-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  padding-left: 0.75rem;
  border: none;
  background: transparent;
  color: #384E8F;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.ds-filter-reset-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1rem;
  background-color: #E5E7EB;
}

.ds-filter-reset-btn:hover {
  color: #2d3e73;
}

/* ============================================
   STATS CARDS GRID
   ============================================ */

.ds-search-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.ds-search-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid #E5E7EB;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  position: relative;
}

.ds-search-stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ds-search-stat-card-title {
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.ds-search-stat-card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #EEF0FA;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.ds-search-stat-card-icon-round {
  border-radius: 9999px;
}

.ds-search-stat-card-value {
  color: #111827;
  font-size: 2rem;
  font-weight: 600;
  line-height: 2.375rem;
  letter-spacing: -0.0125em;
}

.ds-search-stat-card-value-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ds-search-stat-card-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background-color: #DCFCE7;
  color: #166534;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.ds-search-stat-card-subtitle {
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.ds-search-stat-card-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #22C55E;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================
   CONTENT LAYOUT (FILTERS + MISSIONS)
   ============================================ */

.ds-search-content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

/* ============================================
   FILTERS SECTION
   ============================================ */

.ds-search-filters {
  display: flex;
  width: 280px;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  flex-shrink: 0;
}

.ds-search-filters-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.ds-search-filters-title {
  color: #111827;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.75rem;
}

.ds-search-filters-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.ds-filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #E5E7EB;
  background-color: #ffffff;
}

.ds-filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.ds-filter-group-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ds-filter-group-title {
  color: #111827;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.ds-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 9999px;
  background-color: #384E8F;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
}

.ds-filter-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ds-filter-group-icon.collapsed {
  transform: rotate(-90deg);
}

.ds-filter-group-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.ds-filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  width: 100%;
}

.ds-filter-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #D1D5DB;
  cursor: pointer;
  flex-shrink: 0;
}

.ds-filter-checkbox:checked {
  background-color: #384E8F;
  border-color: #384E8F;
}

.ds-filter-checkbox-text {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.ds-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding-top: 0.5rem;
}

/* ============================================
   MISSIONS SECTION
   ============================================ */

.ds-search-missions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
}

.ds-search-missions-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.ds-search-missions-title {
  color: #111827;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.75rem;
}

.ds-search-missions-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.ds-search-missions-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  background-color: #F3F4F6;
}

.ds-search-missions-tab {
  display: flex;
  padding: 0.5rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.ds-search-missions-tab:hover {
  color: #111827;
  background-color: #E5E7EB;
}

.ds-search-missions-tab.active {
  color: #111827;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.ds-search-missions-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #E5E7EB;
  background-color: #ffffff;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
}

.ds-search-missions-sort:hover {
  background-color: #F9FAFB;
}

/* ============================================
   MISSION CARD (Search variant)
   ============================================ */

/* Note: .ds-mission-cards-list is now defined in cards.css as a shared component */

.ds-search-mission-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #E5E7EB;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  width: 100%;
}

.ds-search-mission-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.ds-search-mission-card-company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ds-search-mission-card-logo {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  background-color: #F3F4F6;
  font-size: 1.5rem;
}

.ds-search-mission-card-company-name {
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
}

.ds-search-mission-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ds-search-mission-card-match {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: #F3F4F6;
}

.ds-search-mission-card-match-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-search-mission-card-match-text {
  color: #6B7280;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.125rem;
}

.ds-search-mission-card-favorite {
  display: flex;
  padding: 0.5rem;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  border: none;
  background-color: #8B5CF6;
  cursor: pointer;
  transition: all 0.2s;
}

.ds-search-mission-card-favorite:hover {
  background-color: #7C3AED;
}

.ds-search-mission-card-favorite.active {
  background-color: #7C3AED;
}

.ds-search-mission-card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.ds-search-mission-card-title {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.75rem;
}

.ds-search-mission-card-description {
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.ds-search-mission-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ds-search-mission-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.ds-search-mission-card-meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-search-mission-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
}

.ds-search-mission-card-price {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.75rem;
}

.ds-search-mission-card-price-unit {
  color: #6B7280;
  font-size: 1rem;
  font-weight: 400;
}

.ds-search-mission-card-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   LOAD MORE
   ============================================ */

.ds-search-load-more {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1.5rem 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .ds-search-content {
    flex-direction: column;
  }

  .ds-search-filters {
    width: 100%;
  }

  .ds-search-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 640px) {
  .ds-search-mission-container {
    padding: 0 1rem;
  }

  .ds-search-stats-grid {
    grid-template-columns: 1fr;
  }

  .ds-search-mission-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ds-search-mission-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .ds-search-mission-card-buttons {
    width: 100%;
  }

  .ds-search-mission-card-buttons .ds-btn {
    flex: 1;
  }
}
