/* ===================================
   Elementor Loop Filter Styles
   =================================== */

.elf-filter-wrapper {
  margin-bottom: 2rem;
  width: 100%;

  padding: 1.5rem;
  border-radius: 8px;
}

.elf-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

/* ===================================
   Filter Groups
   =================================== */

.elf-filter-group {
  flex: 1 1 0;
  min-width: 0;
}

/* ===================================
   Search Input
   =================================== */

.elf-search-input {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #03202e;
  border: 2px solid #ffffff;
  border-radius: 50px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.elf-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.elf-search-input:focus {
  outline: none;
  background: #04293a;
}

.elf-search-input:hover {
  background: #04293a;
}

/* ===================================
   Dropdown Styles
   =================================== */

.elf-dropdown {
  position: relative;
}

.elf-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #03202e;
  border: 2px solid #ffffff;
  border-color: #fff !important;
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  color: #ffffff;
}

.elf-dropdown-toggle:hover {
  background: #04293a;
  border-color: #ffffff;
}

.elf-dropdown-toggle.has-selection {
  background: #04293a;
  border-color: #ffffff;
}

.elf-dropdown-label {
  font-weight: 500;
  margin-right: auto;
  color: #ffffff;
}

.elf-dropdown-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
  margin-left: 1rem;
  color: #ffffff;
}

.elf-dropdown-arrow::before {
  content: "→";
}

.elf-dropdown-menu.elf-open + .elf-dropdown-toggle .elf-dropdown-arrow,
.elf-dropdown-menu.elf-open ~ .elf-dropdown-toggle .elf-dropdown-arrow {
  transform: rotate(90deg);
}

/* ===================================
   Dropdown Menu
   =================================== */

.elf-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #03202e;
  border: 2px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
}

.elf-dropdown-menu.elf-open {
  display: block;
}

.elf-dropdown-inner {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.75rem;
}

/* Custom scrollbar */
.elf-dropdown-inner::-webkit-scrollbar {
  width: 6px;
}

.elf-dropdown-inner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.elf-dropdown-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.elf-dropdown-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Checkbox Styles
   =================================== */

.elf-checkbox-label {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
  color: #ffffff;
}

.elf-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.elf-checkbox-label input[type="checkbox"] {
  margin: 0;
  margin-right: 0.875rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #ff5722;
}

.elf-checkbox-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  font-size: 14px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

.elf-term-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-left: 0.5rem;
}

/* ===================================
   Filter Actions
   =================================== */

.elf-filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 0 0 auto;
}

.elf-apply-btn,
.elf-reset-btn {
  padding: 0.875rem 2rem;
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.elf-apply-btn {
  background: #ff5722;
  color: #ffffff;
}

.elf-apply-btn:hover:not(:disabled) {
  background: #e64a19;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}

.elf-apply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.elf-reset-btn {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.elf-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

/* ===================================
   Loading State
   =================================== */

.elf-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.elf-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid #ff5722;
  border-radius: 50%;
  animation: elf-spin 0.8s linear infinite;
}

@keyframes elf-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===================================
   No Results Message
   =================================== */

.elf-no-results {
  padding: 2.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed #ffffff;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

/* ===================================
   Post Items (Default AJAX Results)
   =================================== */

.elf-post-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.elf-post-thumbnail {
  margin-bottom: 1rem;
}

.elf-post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.elf-post-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.elf-post-title a {
  color: #333;
  text-decoration: none;
}

.elf-post-title a:hover {
  color: #2271b1;
}

.elf-post-meta {
  margin-bottom: 1rem;
  font-size: 14px;
  color: #666;
}

.elf-post-excerpt {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.elf-read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #2271b1;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s ease;
}

.elf-read-more:hover {
  background: #135e96;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .elf-filter-form {
    flex-direction: column;
  }

  .elf-filter-group {
    width: 100%;
  }

  .elf-filter-actions {
    width: 100%;
  }

  .elf-apply-btn,
  .elf-reset-btn {
    flex: 1;
  }
}
