/* =============================================
   Listings Sort – Dropdown Style
   ============================================= */
.listings-sort-controls {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0px 0;
  flex-wrap: wrap;
  flex-direction: column;
}

.listings-sort-controls .sort-label {
  font-size: 16px;
  font-weight: 600;
  color: #002349;
  white-space: nowrap;
  font-family: "Open Sans";
}

/* Custom select wrapper */
.sort-select-wrapper {
  position: relative;
  display: inline-flex;
  min-width: 228px;
}

.sort-select-wrapper .sort-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 40px 12px 14px;
  font-size: 16px;
  font-weight: 400;
  font-family: "Open Sans";
  color: #002349;
  background: #00000012;
  border: 1px solid #BCBCBC80;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  line-height: 1.4;
  border-radius: 0px;
}

.sort-select-wrapper .sort-select:hover {
  border-color: #0073aa;
}

.sort-select-wrapper .sort-select:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

/* Custom dropdown arrow */
.sort-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sort-select-arrow svg {
  width: 100%;
  height: 100%;
}

/* Loading Overlay */
.listings-sort-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  z-index: 10;
  border-radius: 8px;
}

.sort-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #0073aa;
  border-radius: 50%;
  animation: sort-spin 0.7s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
  .listings-sort-controls {
    gap: 8px;
  }

  .sort-select-wrapper {
    min-width: 270px;
    width: 100%;
  }

  .sort-select-wrapper .sort-select {
    font-size: 14px;
    padding: 12px 36px 12px 12px;
  }

  .listings-sort-controls .sort-label {
    width: 100%;
  }
}