/* ========================
   SEARCH BAR STYLING
======================== */
.search-bar-container {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem auto;
  margin-top: 50vh;
  max-width: 1200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

#resales-search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.search-input-group {
  display: flex;
  flex-direction: column;
}

.search-input-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 0.9rem;
}

.search-input-group input,
.search-input-group select,
.search-input-group button {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: white;
}

.search-input-group input:focus,
.search-input-group select:focus {
  outline: none;
  border-color: #ffba08;
  box-shadow: 0 0 0 2px rgba(255, 186, 8, 0.2);
}

#other-features-btn {
  background-color: #f8f9fa;
  color: #333;
  cursor: pointer;
  text-align: left;
}

#other-features-btn:hover {
  background-color: #e9ecef;
}

#resales-search-form button[type="submit"] {
  background-color: #ffba08;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  height: fit-content;
  grid-column: span 2;
}

#resales-search-form button[type="submit"]:hover {
  background-color: #e0a806;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: #000;
}


/* Drawer Styling */
/* Fullscreen Drawer Overlay */
.drawer {
  position: fixed;
  top: 0;
  left: -300%; /* hidden by default */
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 1001;
  padding: 1.5rem;
  overflow-y: auto;
  transition: right 0.3s ease;
}

.drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.drawer-header h3 {
  margin: 0;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Group headings for categories */
.feature-category {
  margin-top: 1.5rem;
}

.feature-category h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.feature-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}






#features-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.feature-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-checkbox input[type="checkbox"] {
  margin: 0;
  transform: scale(1.2);
}

#apply-features-btn {
  background-color: #ffba08;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

#apply-features-btn:hover {
  background-color: #e0a806;
}

/* Search Results */
#search-results {
  margin-top: 2rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
}

.notice-message {
  background-color: #d1ecf1;
  color: #0c5460;
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
}




.resales-status-grid {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #3366cc;
}

.status-heading {
    font-size: 20px;
    margin-bottom: 8px;
}

.status-meta {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}







.resales-pagination {
  margin: 1.5rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.resales-pagination ul {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.resales-pagination .page-link {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: #333;
}

.resales-pagination .page-link:hover {
  background: #f0f0f0;
}

.resales-pagination .page-link.active {
  background: #ffba08;
  border-color: #ffba08;
  color: #fff;
  pointer-events: none;
}

.resales-pagination .ellipsis {
  padding: 6px 8px;
  color: #999;
}

.resales-pagination-meta {
  color: #666;
  font-size: 0.9rem;
}






/* Spec bar: stacked, responsive columns */
.card-specbar{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid #eee;
  background:#fff;
}

.card-specbar .spec{
  display:flex;
  flex-direction:column;           /* stack! */
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 6px;
  border-right:1px solid #eee;
}

.card-specbar .spec:nth-child(4n){ border-right:none; }

.card-specbar .spec-icon svg{
  width:22px;height:22px;
}

.card-specbar .spec-text{ text-align:center; line-height:1.1; }
.card-specbar .spec-text strong{ font-size:.95rem; font-weight:700;display:block; }
.card-specbar .spec-text small{ font-size:.72rem; color:#666; }

/* Responsive: fewer columns so it never cramps */
@media (max-width: 1100px){ .card-specbar{ grid-template-columns:repeat(3,1fr);} }
@media (max-width: 680px){  .card-specbar{ grid-template-columns:repeat(2,1fr);} }






/* Responsive Design */
@media (max-width: 768px) {
  .search-bar-container {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  #resales-search-form {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  #resales-search-form button[type="submit"] {
    grid-column: span 2;
    padding: 1rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .search-bar-container {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  #resales-search-form {
    grid-template-columns: 1fr;
  }
  
  #resales-search-form button[type="submit"] {
    grid-column: span 1;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 1rem;
  }
}

/*
#resales-search-form.hide-advanced .is-advanced {
  display: none;
}
*/

#resales-search-form .filters-toggle {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f9fa;
  cursor: pointer;
}


/* --- Loading box (replaces the plain .loading look) --- */
.loading-box{
  display:flex; align-items:center; gap:.75rem;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid #eee;
  background: #fffdf5;
  border-left: 4px solid #ffba08;
  border-radius: 6px;
  color:#444;
}
.loading-box .spinner{
  width:18px; height:18px;
  border:3px solid #ffd768; border-top-color:#ffba08; border-radius:50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }








.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  cursor: pointer;
  color: white; /* default */
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
  transition: color 0.2s ease;
  user-select: none;
}
.favorite-btn.active {
  color: red;
}




/* SVG heart styling */
.favorite-btn svg{ width:24px; height:24px; display:block; }
.favorite-btn:not(.active) svg path{
  fill:none;               /* outline look when not active */
  stroke:currentColor;
  stroke-width:2;
}
.favorite-btn.active svg path{
  fill:currentColor;       /* filled heart when active */
  stroke:none;
}




.mt-0 .search-bar-container {
  margin-top: 0 !important;
}




/* Submit button: disabled + inline spinner */
#resales-search-form button[type="submit"][disabled]{
  opacity:.85;
  cursor:not-allowed;
  filter:saturate(.85);
  position:relative;
}

#resales-search-form button[type="submit"] .btn-spinner{
  width:16px; height:16px;
  border:2px solid rgba(255,255,255,.55);
  border-top-color:#fff;
  border-radius:50%;
  display:inline-block;
  vertical-align:middle;
  margin-right:.5rem;
  animation: spin .9s linear infinite;
}

/* (reuses @keyframes spin you already have) */



/* Better styling for datalist dropdowns (WebKit/Blink) */
input[list]::-webkit-calendar-picker-indicator {
  display: none !important; /* hide default dropdown arrow */
}

datalist option {
  background-color: #fff; /* fallback */
  color: #333;
  padding: 8px;
}

/* Chrome, Edge, Safari: override dropdown look */
input[list]::-webkit-autofill,
input[list]::-webkit-input-placeholder {
  background-color: transparent !important;
}

/* Firefox-specific tweak */
input[list] {
  background-color: #fff;
  color: #333;
}

/* DARK MODE adjustments *//*
@media (prefers-color-scheme: dark) {
  datalist option {
    background-color: #1e293b;
    color: #f1f5f9;
  }
  input[list] {
    background-color: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
  }
  input[list]:focus {
    border-color: #ffba08;
    box-shadow: 0 0 0 2px rgba(255, 186, 8, 0.2);
  }
}
*/
