/* Property Post Wizard – scoped styles */
.property-post-wizard {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  scroll-margin-top: 120px;
}

.property-post-wizard *,
.property-post-wizard *::before,
.property-post-wizard *::after {
  box-sizing: border-box;
}

.property-post-wizard .ppw-form-body,
.property-post-wizard .cs_contact_form,
.property-post-wizard .ppw-section {
  max-width: 100%;
  min-width: 0;
}

.property-post-wizard .row {
  max-width: 100%;
  min-width: 0;
}

.property-post-wizard .row > [class*="col-"] {
  min-width: 0;
  max-width: 100%;
}

.property-post-wizard .cs_form_field,
.property-post-wizard textarea.cs_form_field,
.property-post-wizard .ppw-select,
.property-post-wizard .ppw-tom-select,
.property-post-wizard .ts-wrapper,
.property-post-wizard .ts-control {
  max-width: 100%;
  width: 100%;
  min-width: 0;
}

.property-post-wizard .ppw-header {
  scroll-margin-top: 120px;
}

.property-post-wizard .ppw-header {
  padding: 20px 30px 24px;
  position: relative;
  border-radius: 7px;
  margin-bottom: 30px;
}

.property-post-wizard .ppw-header::before {
  content: "";
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: var(--accent-color);
  opacity: 0.07;
  position: absolute;
  left: 0;
  top: 0;
}

.property-post-wizard .ppw-header > * {
  position: relative;
  z-index: 1;
}

.property-post-wizard .ppw-step-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.property-post-wizard .ppw-progress {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.property-post-wizard .ppw-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background-color: var(--border-color);
  transition: background-color 0.3s ease;
}

.property-post-wizard .ppw-progress-bar.is-active,
.property-post-wizard .ppw-progress-bar.is-complete {
  background-color: var(--primary-color);
}

.property-post-wizard .ppw-section {
  margin-bottom: 32px;
}

.property-post-wizard .ppw-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.property-post-wizard .ppw-section-title span {
  font-weight: 400;
  color: var(--body-color);
  font-size: 14px;
}

.property-post-wizard .ppw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.property-post-wizard .ppw-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: var(--white-color);
  color: var(--heading-color);
  font-size: 14px;
  font-family: var(--primary-font);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  min-height: 42px;
  line-height: 1.3;
  text-align: center;
}

.property-post-wizard .ppw-chip:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.property-post-wizard .ppw-chip.is-selected {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}

.property-post-wizard .ppw-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.property-post-wizard .ppw-field-group {
  margin-bottom: 24px;
}

.property-post-wizard .ppw-field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--heading-color);
  margin-bottom: 8px;
}

.property-post-wizard .ppw-field-label .ppw-optional {
  font-weight: 400;
  color: var(--body-color);
  font-size: 13px;
}

.property-post-wizard .ppw-field-label .ppw-required {
  color: #dc3545;
}

.property-post-wizard .ppw-input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.property-post-wizard .ppw-input-row .cs_form_field {
  flex: 1;
  min-width: 0;
}

.property-post-wizard .ppw-unit-select {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--white-color);
  color: var(--heading-color);
  font-size: 14px;
  cursor: pointer;
}

.property-post-wizard .ppw-unit-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.property-post-wizard .ppw-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 8px;
}

.property-post-wizard .ppw-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.property-post-wizard .ppw-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.property-post-wizard .ppw-negotiable {
  margin-top: 12px;
}

.property-post-wizard .ppw-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  min-height: 48px;
  align-items: center;
}

.property-post-wizard .ppw-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  color: var(--heading-color);
}

.property-post-wizard .ppw-radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.property-post-wizard .ppw-select {
  width: 100%;
  appearance: none;
  background-color: var(--white-color);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
  color: var(--heading-color);
}

.property-post-wizard .ppw-select.is-placeholder {
  color: var(--body-color);
}

/* Template Tom Select dropdowns */
.property-post-wizard .ppw-tom-select,
.property-post-wizard .ts-wrapper {
  width: 100% !important;
  max-width: 100%;
  display: block;
}

.property-post-wizard .ts-control {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  background-color: var(--white-color);
  font-size: 16px;
  line-height: 1.6em;
  padding: 12px 40px 12px 16px;
}

.property-post-wizard .ts-control::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
  opacity: 0.55;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.property-post-wizard .ppw-field-error .ts-wrapper .ts-control {
  border-color: #d9534f;
}

.property-post-wizard .ppw-section-note,
.property-post-wizard .ppw-type-prompt {
  font-size: 14px;
  color: var(--body-color);
  margin: 0 0 16px;
}

.property-post-wizard .ppw-section.is-hidden,
.property-post-wizard .ppw-price-block.is-hidden,
.property-post-wizard .ppw-type-prompt.is-hidden,
.property-post-wizard [data-ppw="project-wrap"].is-hidden {
  display: none !important;
}

.property-post-wizard .ppw-suffix-wrap .ppw-suffix {
  white-space: nowrap;
}

.property-post-wizard .ppw-suffix-wrap {
  position: relative;
}

.property-post-wizard .ppw-suffix-wrap .ppw-has-suffix {
  padding-right: 78px;
}

.property-post-wizard .ppw-has-suffix::-webkit-outer-spin-button,
.property-post-wizard .ppw-has-suffix::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.property-post-wizard .ppw-has-suffix {
  -moz-appearance: textfield;
  appearance: textfield;
}

.property-post-wizard .ppw-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--body-color);
  pointer-events: none;
}

.property-post-wizard .ppw-field-error .ppw-radios {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.06);
}

.property-post-wizard .ppw-detect-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--primary-color);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 8px;
}

.property-post-wizard .ppw-detect-location:hover {
  text-decoration: underline;
}

.property-post-wizard .ppw-validation-msg {
  display: none;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: rgba(220, 53, 69, 0.08);
  color: #dc3545;
  font-size: 14px;
  margin-bottom: 20px;
}

.property-post-wizard .ppw-validation-msg.is-visible {
  display: block;
}

.property-post-wizard .ppw-field-error .cs_form_field,
.property-post-wizard .ppw-field-error .ppw-unit-select,
.property-post-wizard .ppw-field-error textarea.cs_form_field {
  border-color: #dc3545 !important;
}

.property-post-wizard .ppw-field-error .ppw-section-title {
  color: #dc3545;
}

.property-post-wizard .ppw-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
}

.property-post-wizard .ppw-nav .cs_btn {
  min-width: 120px;
}

.property-post-wizard .ppw-nav-back {
  margin-right: auto;
  background: transparent !important;
  color: var(--heading-color) !important;
  border: 1px solid var(--border-color) !important;
}

.property-post-wizard .ppw-nav-back:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.property-post-wizard .ppw-step {
  display: none;
}

.property-post-wizard .ppw-step.is-active {
  display: block;
}

/* Contact block */
.property-post-wizard .ppw-contact-card {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--gray3-color);
  margin-top: 8px;
}

.property-post-wizard .ppw-contact-card p {
  margin-bottom: 6px;
  font-size: 14px;
}

.property-post-wizard .ppw-contact-card .ppw-change-account {
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: underline;
}

/* Photo upload */
.property-post-wizard .ppw-photo-upload {
  border: 2px dashed var(--accent-color);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.property-post-wizard .ppw-photo-upload:hover {
  background-color: rgba(var(--accent-color-rgb, 252, 94, 8), 0.03);
}

.property-post-wizard .ppw-photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.property-post-wizard .ppw-photo-upload i {
  font-size: 28px;
  color: var(--accent-color);
  margin-bottom: 10px;
  display: block;
}

.property-post-wizard .ppw-photo-count {
  font-size: 13px;
  color: var(--body-color);
  margin-top: 10px;
}

.property-post-wizard .ppw-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

.property-post-wizard .ppw-field-message {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #dc3545;
  line-height: 1.45;
}

.property-post-wizard .ppw-field-message[hidden] {
  display: none;
}

.property-post-wizard .ppw-field-hint:has(+ .ppw-field-message:not([hidden])) {
  display: none;
}

.property-post-wizard .ppw-locality-combobox {
  position: relative;
}

.property-post-wizard .ppw-locality-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid rgba(29, 29, 29, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.property-post-wizard .ppw-locality-list[hidden] {
  display: none !important;
}

.property-post-wizard .ppw-locality-list li {
  padding: 10px 14px;
  font-size: 14px;
  color: #1d1d1d;
  cursor: pointer;
}

.property-post-wizard .ppw-locality-list li:hover,
.property-post-wizard .ppw-locality-list li:focus {
  background: rgba(252, 94, 8, 0.08);
  outline: none;
}

.property-post-wizard .ppw-locality-list .ppw-locality-empty {
  color: #777;
  cursor: default;
}

.property-post-wizard .ppw-locality-list .ppw-locality-empty:hover {
  background: transparent;
}

.property-post-wizard .ppw-locality-list .ppw-locality-main {
  display: block;
}

.property-post-wizard .ppw-locality-list .ppw-locality-secondary {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #777;
}

.property-post-wizard .ppw-locality-list .ppw-locality-attribution {
  padding: 6px 14px 2px;
  border-top: 1px solid rgba(29, 29, 29, 0.08);
  font-size: 11px;
  color: #999;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.property-post-wizard .ppw-locality-list .ppw-locality-attribution img {
  display: block;
  height: 16px;
  width: auto;
}

.property-post-wizard .ppw-locality-list .ppw-locality-attribution:hover {
  background: transparent;
}

.property-post-wizard .ppw-photo-upload:has(input:disabled) {
  opacity: 0.55;
  pointer-events: none;
}

.property-post-wizard .ppw-photo-tips {
  font-size: 13px;
  color: var(--body-color);
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--gray3-color);
  border-radius: 8px;
}

.property-post-wizard .ppw-photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.property-post-wizard .ppw-photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.property-post-wizard .ppw-photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-post-wizard .ppw-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
}

.property-post-wizard .ppw-char-counter {
  text-align: right;
  font-size: 13px;
  color: var(--body-color);
  margin-top: 6px;
}

.property-post-wizard .ppw-char-counter.is-invalid {
  color: #dc3545;
}

/* Success state */
.property-post-wizard .ppw-success {
  display: none;
  text-align: center;
  padding: 60px 30px;
}

.property-post-wizard .ppw-success.is-visible {
  display: block;
}

.property-post-wizard .ppw-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(40, 167, 69, 0.12);
  color: #28a745;
  font-size: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.property-post-wizard .ppw-success h3 {
  margin-bottom: 12px;
}

.property-post-wizard .ppw-success p {
  color: var(--body-color);
  max-width: 420px;
  margin: 0 auto 24px;
}

.property-post-wizard .ppw-form-body.is-hidden {
  display: none;
}

/* Step 2 dynamic fields spacing */
.property-post-wizard .ppw-step2-fields .row {
  --bs-gutter-y: 20px;
}

.property-post-wizard .ppw-amenities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 767px) {
  .property-post-wizard.cs_add_property_container,
  .cs_add_property_container.property-post-wizard {
    width: 100%;
    max-width: 100%;
    padding: 24px 16px;
    margin-left: 0;
    margin-right: 0;
  }

  .property-post-wizard .row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .property-post-wizard .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .property-post-wizard .ppw-photo-upload {
    padding: 28px 14px;
  }

  .property-post-wizard .ppw-success {
    padding: 40px 16px;
  }
}

@media (max-width: 575px) {
  .property-post-wizard .ppw-chip {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 38px;
  }

  .property-post-wizard .ppw-nav {
    flex-direction: column-reverse;
  }

  .property-post-wizard .ppw-nav .cs_btn {
    width: 100%;
    min-width: 0;
  }

  .property-post-wizard .ppw-nav-back {
    margin-right: 0;
    order: 1;
  }

  .property-post-wizard .ppw-input-row {
    flex-direction: column;
  }

  .property-post-wizard .ppw-unit-select {
    max-width: 100%;
    width: 100%;
  }

  .property-post-wizard .ppw-photo-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
}

/* Post property page – prevent mobile horizontal scroll */
.gm-post-property-page,
.gm-post-property-section {
  overflow-x: clip;
  max-width: 100%;
}

.gm-post-property-section .row,
.gm-post-property-section [class*="col-"] {
  min-width: 0;
}

@media (max-width: 767px) {
  .gm-post-property-section .container {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .property-post-wizard .ppw-header {
    padding: 16px;
  }

  .property-post-wizard .ppw-chips {
    gap: 8px;
  }
}

/* Property Post Modal */
.ppw-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.ppw-modal.active {
  visibility: visible;
  opacity: 1;
}

.ppw-modal-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--primary-color);
  opacity: 0.5;
}

.ppw-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  overflow: hidden;
}

.ppw-modal.active .ppw-modal-dialog {
  transform: translateY(0);
}

.ppw-modal-topbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 12px 0;
  background: var(--white-color);
  position: relative;
  z-index: 6;
}

.ppw-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--white-color);
  color: var(--heading-color);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ppw-modal-close:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.ppw-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
}

.ppw-modal .property-post-wizard {
  max-width: 100%;
  margin: 0;
  padding: 8px 16px 30px;
}

.ppw-modal .property-post-wizard .ppw-header {
  padding-top: 8px;
  margin-top: 0;
}

.ppw-modal .cs_mobile_nav_list_property {
  display: inline-flex;
  min-width: 180px;
  min-height: 46px;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 8px;
}

@media (min-width: 576px) {
  .ppw-modal {
    align-items: center;
    padding: 16px;
  }

  .ppw-modal-dialog {
    max-width: 640px;
    height: auto;
    max-height: 92vh;
    border-radius: 12px;
    transform: scale(0.92);
  }

  .ppw-modal.active .ppw-modal-dialog {
    transform: scale(1);
  }

  .ppw-modal-topbar {
    padding: 12px 14px 0;
  }
}

@media (min-width: 992px) {
  .ppw-modal {
    display: none !important;
  }
}
