/* Business Directory Frontend Styles */

#bd-directory-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.bd-filters {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 40px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.08);
}

.bd-search-box {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bd-search-box input {
  flex: 1;
  min-width: 280px;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bd-search-box input:focus {
  outline: none;
  border-color: #2b468d;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.15);
  transform: translateY(-1px);
}

.bd-search-box button,
.bd-filter-selects button {
  background: linear-gradient(135deg, #2b468d 0%, #1e3366 100%);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.3);
}

.bd-search-box button:hover,
.bd-filter-selects button:hover {
  background: linear-gradient(135deg, #1e3366 0%, #152a5c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 70, 141, 0.4);
}

.bd-filter-selects {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.bd-filter-selects select {
  padding: 12px 18px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 14px;
  min-width: 180px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bd-filter-selects select:focus {
  outline: none;
  border-color: #2b468d;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.15);
}

#bd-reset-filters {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
}

#bd-reset-filters:hover {
  background: linear-gradient(135deg, #545b62 0%, #3d4449 100%) !important;
}

#bd-loading {
  text-align: center;
  padding: 60px;
  font-size: 18px;
  color: #2b468d;
  font-weight: 500;
}

.bd-businesses-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.bd-business-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(43, 70, 141, 0.08);
  box-shadow: 0 8px 25px rgba(43, 70, 141, 0.08);
  position: relative;
}

.bd-business-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(43, 70, 141, 0.15);
  border-color: rgba(43, 70, 141, 0.2);
}

.bd-business-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2b468d 0%, #f1ac3c 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bd-business-card:hover::before {
  opacity: 1;
}

.bd-business-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px 20px 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.bd-business-image img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 8px 25px rgba(43, 70, 141, 0.15);
  transition: all 0.3s ease;
}

.bd-business-card:hover .bd-business-image img {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(43, 70, 141, 0.25);
}

.bd-business-info {
  padding: 20px;
  text-align: center;
}

.bd-business-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #2b468d;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-business-category {
  margin-bottom: 12px;
  min-height: 25px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.bd-category-tag {
  background: linear-gradient(135deg, #f1ac3c 0%, #e09900 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(241, 172, 60, 0.3);
  transition: all 0.3s ease;
}

.bd-category-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(241, 172, 60, 0.4);
}

.bd-business-location,
.bd-business-address {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 8px;
  line-height: 1.4;
  min-height: 18px;
}

.bd-business-location {
  font-weight: 500;
  color: #2b468d;
}

.bd-business-actions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #f1f3f4;
}

.bd-view-business {
  background: linear-gradient(135deg, #2b468d 0%, #1e3366 100%);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.3);
}

.bd-view-business:hover {
  background: linear-gradient(135deg, #1e3366 0%, #152a5c 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 70, 141, 0.4);
}

.bd-no-results {
  text-align: center;
  padding: 80px 20px;
  font-size: 18px;
  color: #6c757d;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 20px;
  border: 2px dashed #dee2e6;
  margin: 40px 0;
}

/* Business Form Styles */
#bd-form-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

#bd-business-form {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(43, 70, 141, 0.1);
  border: 1px solid rgba(43, 70, 141, 0.08);
}

.bd-form-row {
  margin-bottom: 25px;
}

.bd-form-row label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: #2b468d;
  font-size: 15px;
}

.bd-form-row input,
.bd-form-row select,
.bd-form-row textarea {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bd-form-row input:focus,
.bd-form-row select:focus,
.bd-form-row textarea:focus {
  outline: none;
  border-color: #2b468d;
  box-shadow: 0 4px 15px rgba(43, 70, 141, 0.15);
  transform: translateY(-1px);
}

#bd-submit-business {
  background: linear-gradient(135deg, #2b468d 0%, #1e3366 100%);
  color: white;
  border: none;
  padding: 18px 40px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 6px 20px rgba(43, 70, 141, 0.3);
}

#bd-submit-business:hover {
  background: linear-gradient(135deg, #1e3366 0%, #152a5c 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(43, 70, 141, 0.4);
}

#bd-submit-business:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#bd-form-message {
  margin-top: 25px;
  padding: 20px;
  border-radius: 12px;
  display: none;
  font-weight: 600;
}

#bd-form-message.success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 2px solid #c3e6cb;
}

#bd-form-message.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 2px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .bd-businesses-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .bd-businesses-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #bd-directory-container {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .bd-businesses-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .bd-search-box,
  .bd-filter-selects {
    flex-direction: column;
    align-items: stretch;
  }

  .bd-search-box input {
    min-width: auto;
  }

  .bd-filter-selects select {
    min-width: auto;
  }

  #bd-form-container {
    padding: 10px;
  }

  #bd-business-form {
    padding: 25px;
  }

  .bd-business-card {
    border-radius: 15px;
  }

  .bd-business-image {
    padding: 20px 15px 10px;
  }

  .bd-business-image img {
    width: 60px;
    height: 60px;
  }

  .bd-business-info {
    padding: 15px;
  }

  .bd-business-name {
    font-size: 14px;
    min-height: 35px;
  }
}

@media (max-width: 480px) {
  .bd-businesses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bd-business-image img {
    width: 50px;
    height: 50px;
  }

  .bd-business-name {
    font-size: 13px;
    min-height: 30px;
  }

  .bd-category-tag {
    font-size: 10px;
    padding: 3px 8px;
  }

  .bd-view-business {
    padding: 8px 15px;
    font-size: 12px;
  }
}

/* RTL Support */
body.rtl .bd-category-tag {
  margin-right: 0;
  margin-left: 5px;
}

body.rtl .bd-filter-selects {
  direction: rtl;
}

body.rtl .bd-search-box {
  direction: rtl;
}

/* Loading Animation */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

#bd-loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Hover Effects */
.bd-business-card {
  cursor: pointer;
}

.bd-business-card:hover .bd-business-name {
  color: #f1ac3c;
}

/* Gradient Backgrounds */
.bd-filters::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(43, 70, 141, 0.02) 0%, rgba(241, 172, 60, 0.02) 100%);
  border-radius: 15px;
  pointer-events: none;
}

.bd-filters {
  position: relative;
}
