/**
 * MCI Archive - Search, sort, loading overlay for people and guide archives
 */

.mci-archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.mci-archive-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
input.mci-archive-search {
    padding-left: 40px;
}
.mci-archive-toolbar-full .mci-archive-search-wrap {
  flex: 1 1 100%;
  max-width: none;
  width: 100%;
}

.mci-archive-search {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  padding-left: 3rem;
  font-size: 0.9375rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 24px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mci-archive-search:focus {
  outline: none;
  border-color: #2E4A7A;
  box-shadow: 0 0 0 3px rgba(46, 74, 122, 0.15);
}

.mci-archive-search::placeholder {
  color: #9ca3af;
}

.mci-archive-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #1a1a1a;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mci-archive-search-icon svg {
  width: 20px;
  height: 20px;
  stroke: #1a1a1a;
}

.mci-archive-sort-wrap {
  flex-shrink: 0;
}

.mci-archive-sort {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4a4a4a;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 24px;
  cursor: pointer;
  appearance: auto;
  min-width: 160px;
}

.mci-archive-sort:focus {
  outline: none;
  border-color: #2E4A7A;
}

.mci-archive-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mci-archive-loading.active {
  opacity: 1;
  visibility: visible;
}

.mci-archive-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.mci-archive-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2E4A7A;
  border-radius: 50%;
  animation: mci-archive-spin 0.8s linear infinite;
}

@keyframes mci-archive-spin {
  to { transform: rotate(360deg); }
}

.mci-archive-loading-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4b5563;
}

.mci-archive-content {
  position: relative;
}

.mci-people-archive,
.mci-guide-archive {
  position: relative;
}

.mci-archive-error {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.mci-archive-pagination.mci-hidden {
  display: none !important;
}

@media (max-width: 575px) {
  .mci-archive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .mci-archive-search-wrap {
    max-width: none;
  }

  .mci-archive-sort {
    min-width: 0;
    width: 100%;
  }
}
