/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
}

/* Navigation and Logo */
nav {
  background-color: #ffffff;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background-color: #e9ecef;
}

.logo {
  padding: 0.5rem 0;
}

.logo-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-adv {
  color: #2D3748;
}

.logo-ent {
  color: #4A5568;
}

.logo-list {
  color: #007bff;
}

.logo-tagline {
  font-size: 0.9rem;
  color: #718096;
  margin-top: 0.2rem;
}

/* Forms */
form {
  max-width: 500px;
  margin: 0 auto;
}

form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

input[type="submit"],
button {
  background-color: #007bff;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

input[type="submit"]:hover,
button:hover {
  background-color: #0056b3;
}

/* Listings */
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.listing {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background-color: white;
}

.listing h2 {
  margin-bottom: 0.5rem;
}

.listing .price {
  color: #28a745;
  font-size: 1.25rem;
  font-weight: bold;
}

.listing .location {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Flash messages */
.notice {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.alert {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

/* Listings Container Layout */
.listings-container {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.listings-sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

.listings-main {
  flex: 1;
}

/* Filters */
.filters {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 1 !important;
  visibility: visible !important;
}

.filter-section {
  margin-bottom: 1.5rem;
  position: relative;
  transition: none !important;
}

.filter-section h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

.filter-section select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background-color: white;
  font-size: 0.875rem;
}

.filter-section select:disabled {
  background-color: #f7fafc;
  cursor: not-allowed;
}

.filter-loader {
  position: absolute;
  right: 0.75rem;
  top: 2rem !important;
}

.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.location-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location-fields .input-group {
  position: relative;
  width: 100%;
}

.location-fields input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.95rem;
}

.distance-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.distance-field input {
  width: 80px;
}

/* Map */
#listings-map {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Location Form Map */
#location-map {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .listings-container {
    flex-direction: column;
  }

  .listings-sidebar {
    position: static;
    width: 100%;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* Main content */
main {
  flex: 1;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid #dee2e6;
  background-color: #f8f9fa;
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.footer-info {
  color: #6c757d;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.contact-link {
  color: #007bff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.contact-link:hover {
  background-color: #e9ecef;
  text-decoration: underline;
}

/* Categories Grid */
.categories-container {
  padding: 2rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.category-card h2 a {
  color: #333;
  text-decoration: none;
}

.category-card h2 a:hover {
  color: #007bff;
}

.category-card h2 a:hover {
  color: #007bff;
}

.category-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.subcategories {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
}

.subcategories h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #495057;
}

.subcategory-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subcategory-item {
  padding: 0;
  margin-bottom: 0.25rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.subcategory-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.subcategory-item:hover {
  background-color: #e9ecef;
}

.subcategory-link:hover {
  color: #007bff;
}

.subcategory-description {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.no-subcategories {
  color: #6c757d;
  font-style: italic;
}

.category-stats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
  color: #6c757d;
  font-size: 0.9rem;
}

.admin-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.admin-actions-bottom {
  margin-top: 2rem;
  text-align: center;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Category Show Page */
.category-show {
  padding: 2rem 0;
}

.category-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.category-header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.category-description {
  font-size: 1.1rem;
  color: #6c757d;
}

.subcategories-section,
.listings-section {
  margin-bottom: 3rem;
}

.subcategories-section h2,
.listings-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.subcategory-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.subcategory-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-color: #007bff;
  text-decoration: none;
  color: inherit;
}

.subcategory-card h3 {
  color: #333;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.subcategory-card:hover h3 {
  color: #007bff;
}

.subcategory-card p {
  color: #6c757d;
  font-size: 0.9rem;
}

.no-subcategories,
.no-listings {
  text-align: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  color: #6c757d;
  font-style: italic;
}

.category-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
}

.actions {
  margin-top: 1.5rem;
}

/* Location Header and Modal */
.location-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.current-location {
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.radius-display {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: normal;
  margin-left: -0.5rem;
}

.change-location-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.change-location-btn:hover {
  color: #0056b3;
}

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

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

.modal h3 {
  margin-bottom: 1.5rem;
  color: #333;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Location Suggestions */
.location-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-main {
  font-weight: 500;
  color: #333;
}

.suggestion-county {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.suggestion-zipcode {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.suggestion-item.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
  cursor: default;
}

.suggestion-item.no-results {
  color: #666;
  cursor: default;
}

.suggestion-item.no-results ul {
  margin-top: 0.5rem;
  margin-left: 1.5rem;
  font-size: 0.85rem;
}

.input-group {
  position: relative;
}

/* Loading state for inputs */
.loading {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 50 50'%3E%3Cpath fill='%23007bff' d='M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.6s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px 20px;
}

/* Unified Search Bar Styles */
.search-container {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.search-wrapper {
  width: 100%;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-size: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 1;
}

.search-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  white-space: nowrap;
}

.search-button:hover {
  background-color: #0056b3;
}

.search-button:active {
  transform: translateY(1px);
}

@media (max-width: 640px) {
  .search-button {
    padding: 0.75rem 1rem;
  }
}

/* Prevent auto-submit on select changes */
.no-auto-submit {
  pointer-events: auto !important;
}

/* Make sure the subcategory filter doesn't disappear */
#subcategory-filter {
  transition: none !important;
  visibility: visible !important;
}

/* Don't allow subcategory filter to be hidden by any animations */
#subcategory-filter[style*="display: block"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure filter sections remain visible */
.filter-section {
  margin-bottom: 1.5rem;
  position: relative;
  transition: none !important;
}

/* Keep all filter sections visible by default */
.filter-section[data-category-filter-target="dateRange"],
.filter-section[data-category-filter-target="priceRange"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Additional styling for filters to make them more visible */
.filters {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}

/* Fix any filter visibility issues during page load */
.filters-form {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fix calendar errors */
.fc-event-title, .fc-event-time {
  white-space: normal !important;
  overflow: visible !important;
}

/* Image Upload Section */
.image-upload-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.image-upload-section h3 {
  margin-bottom: 1rem;
  color: #333;
}

/* Unified Upload Container */
.unified-upload-container {
  border: 2px dashed #ccc;
  border-radius: 8px;
  background-color: rgba(248, 249, 250, 0.7);
  padding: 0;
  position: relative;
  min-height: 200px;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.unified-upload-container.empty .image-preview-section {
  display: none;
}

.unified-upload-container.empty .add-more-section {
  height: 200px;
}

.unified-upload-container.highlight {
  border-color: #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

.unified-upload-container.drag-active {
  border-color: #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

/* Image preview section */
.image-preview-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  min-height: 50px;
}

/* Add more section */
.add-more-section {
  padding: 1.5rem;
  border-top: 1px dashed #dee2e6;
  position: relative;
  transition: all 0.3s ease;
  min-height: 100px;
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: pointer;
  text-align: center;
  height: 100%;
  color: #6c757d;
  transition: all 0.2s ease;
}

.upload-prompt:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.upload-prompt .upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #6c757d;
}

.upload-prompt h4 {
  font-size: 1rem;
  margin-bottom: 0;
  color: #495057;
}

/* Instructions area */
.image-instructions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6c757d;
}

/* Update image item styles */
.image-item {
  position: relative;
  width: 120px;
  height: 120px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1;
  user-select: none;
}

.image-item.dragging {
  opacity: 0.7;
  cursor: grabbing;
  z-index: 1000;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.image-item .image-preview {
  width: 100%;
  height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.image-item .image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Prevent image dragging conflicts */
  max-width: 100%;
  display: block;
}

.image-item .image-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
}

.image-item .image-actions .btn {
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 20px;
  text-align: center;
  font-size: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
}

.image-item .image-actions .btn:hover {
  background-color: #dc3545;
  color: white;
}

.image-order-indicator {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  z-index: 2;
}

.drag-indicator {
  position: absolute;
  top: calc(50% - 10px);
  left: calc(50% - 15px);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 2;
}

.image-item:hover .drag-indicator {
  opacity: 1;
}

/* Listing Images Gallery */
.listing-images-gallery {
  margin-bottom: 2rem;
}

.main-image-container {
  position: relative;
  margin-bottom: 1rem;
}

.listing-images-gallery .main-image {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.listing-images-gallery .main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Gallery navigation buttons */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 5;
}

.gallery-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav-btn.prev-btn {
  left: 10px;
}

.gallery-nav-btn.next-btn {
  right: 10px;
}

/* Image counter */
.image-counter {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.85rem;
  z-index: 5;
}

.listing-images-gallery .image-thumbnails {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 5px;
  scroll-behavior: smooth;
}

.listing-images-gallery .thumbnail {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #dee2e6;
  transition: all 0.2s ease;
}

.listing-images-gallery .thumbnail:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.listing-images-gallery .thumbnail.active {
  border-color: #007bff;
}

.listing-images-gallery .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card improvements for listings */
.listing-card {
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img-container {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .card-img-container img {
  transform: scale(1.05);
}

.no-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  color: #adb5bd;
}

.no-image-placeholder i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Hidden file input */
.hidden-file-input {
  display: none !important;
}

/* Image upload error message */
.upload-error-message {
  display: none;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease-in-out;
  margin-bottom: 1rem;
}

.file-format-info {
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Image Zoom Functionality */
.main-image {
  cursor: zoom-in;
  position: relative;
}

.zoomed-image-container {
  position: absolute;
  z-index: 1000;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  cursor: zoom-out;
}

.zoomed-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  transition: transform 0.05s ease-out;
}

.zoom-indicator {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 1001;
}

.zoom-indicator i {
  font-size: 1rem;
}

body.zooming {
  overflow: hidden;
}

/* Additional Gallery Styles */
.listing-images-gallery .main-image img {
  transition: opacity 0.3s ease;
}

.listing-images-gallery .main-image:hover::before {
  content: '🔍';
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 18px;
  opacity: 0.8;
}

/* Add styles for logout visual feedback at the end of the file */

body.logging-out {
  cursor: wait;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.logout-in-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1.5rem 2.5rem;
  border-radius: 0.5rem;
  z-index: 9999;
  font-size: 1.2rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
