/* Show only invalid errors — no green tick / valid highlight */
.was-validated .form-control:valid,
.was-validated .form-select:valid,
.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus,
.form-control.is-valid,
.form-select.is-valid,
.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: var(--bs-border-color);
  background-image: none !important;
  padding-right: 0.75rem;
  box-shadow: none;
}

.was-validated .form-floating > .form-control:not(:placeholder-shown):valid ~ label::after,
.was-validated .form-floating > .form-select:valid ~ label::after,
.form-floating > .form-control.is-valid ~ label::after,
.form-floating > .form-select.is-valid ~ label::after {
  background-color: transparent !important;
}

.valid-feedback {
  display: none !important;
}

/* Login: full-bleed property image on left */
.login-hero {
  background-image: url("../images/backgrounds/login-property.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-hero .logo-img img {
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.85));
}

/* Sell / Rent / Lease listing type radios */
.listing-type-radios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.listing-type-radio {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.listing-type-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.listing-type-radio-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: #f8f9fb;
  color: #3a3f47;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.listing-type-radio-card::before {
  content: '';
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #9aa3ad;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 0 #5b2d8e;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.listing-type-radio:hover .listing-type-radio-card {
  background: #fff;
  border-color: #c5ccd4;
}

.listing-type-radio input:checked + .listing-type-radio-card {
  background: #fff;
  border-color: #5b2d8e;
  box-shadow: 0 0 0 1px rgba(91, 45, 142, 0.2);
  color: #5b2d8e;
}

.listing-type-radio input:checked + .listing-type-radio-card::before {
  border-color: #5b2d8e;
  box-shadow: inset 0 0 0 0.28rem #5b2d8e;
}

.listing-type-radio input:focus-visible + .listing-type-radio-card {
  outline: 2px solid rgba(91, 45, 142, 0.35);
  outline-offset: 2px;
}

.listing-type-radio-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.listing-type-radio-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.25;
  opacity: 0.75;
}

.listing-panel[hidden] {
  display: none !important;
}

.listing-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.listing-panel-help {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .listing-type-radios {
    grid-template-columns: 1fr;
  }
}

/* Property form wizard */
.property-wizard-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.property-wizard-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: #f8f9fb;
  color: var(--bs-secondary-color);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.property-wizard-step:hover {
  background: #fff;
}

.property-wizard-step.is-active {
  background: #fff;
  border-color: #5b2d8e;
  color: #5b2d8e;
  box-shadow: 0 0 0 1px rgba(91, 45, 142, 0.15);
}

.property-wizard-step.is-done {
  border-color: rgba(91, 45, 142, 0.35);
  color: #3a3f47;
}

.property-wizard-step-index {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e8ebef;
  color: inherit;
}

.property-wizard-step.is-active .property-wizard-step-index,
.property-wizard-step.is-done .property-wizard-step-index {
  background: #5b2d8e;
  color: #fff;
}

.property-wizard-step-copy {
  min-width: 0;
}

.property-wizard-step-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.property-wizard-step-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  opacity: 0.75;
  line-height: 1.25;
}

.property-wizard-pane[hidden] {
  display: none !important;
}

.property-wizard-pane-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.property-wizard-pane-help {
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  margin-bottom: 1.15rem;
}

.property-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

@media (max-width: 991.98px) {
  .property-wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .property-wizard-steps {
    grid-template-columns: 1fr;
  }
}

/* Property photo gallery + lightbox */
.property-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.property-photo-item {
  position: relative;
}

.property-photo-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f3f5f7;
  cursor: pointer;
  text-align: left;
}

.property-photo-remove {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 37, 41, 0.78);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.property-photo-remove:hover {
  background: #dc3545;
}

.property-photo-remove:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.property-photo-thumb img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.property-photo-thumb:hover img {
  transform: scale(1.04);
}

.property-photo-thumb-meta {
  padding: 0.5rem 0.65rem 0.65rem;
}

.property-photo-thumb-meta .fw-semibold {
  font-size: 0.78rem;
  line-height: 1.25;
  word-break: break-word;
}

.property-photo-thumb-zoom {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.property-photo-thumb:hover .property-photo-thumb-zoom {
  opacity: 1;
}

#propertyGalleryModal .modal-content {
  background: #111;
  border: 0;
  border-radius: 0.85rem;
  overflow: hidden;
}

#propertyGalleryModal .modal-header,
#propertyGalleryModal .modal-footer {
  border: 0;
  background: transparent;
}

#propertyGalleryModal .modal-title {
  color: #fff;
  font-size: 0.95rem;
}

#propertyGalleryModal .btn-close {
  filter: invert(1);
}

#propertyGalleryModal .modal-body {
  padding: 0.5rem 1rem 1rem;
  text-align: center;
}

#propertyGalleryModalImg {
  max-width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  border-radius: 0.5rem;
}

#propertyGalleryModal .gallery-nav-btn {
  min-width: 2.5rem;
}
