/* Add Property — matches add-new-property AddPropertyForm */

/* Page shell — guest layout uses compact vertical padding on this route */
.add-property-page-shell {
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0)) !important;
}

/* Contact-form style inputs (match contact_us) */
.contact-form .form-select {
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
}
.contact-form .form-control {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 10px;
}
.contact-form .form-label {
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}
.contact-form .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(23, 59, 69, 0.15);
}

.add-property-col {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
@media (min-width: 576px) {
  .add-property-col { padding-left: 0.75rem; padding-right: 0.75rem; }
}
@media (min-width: 768px) {
  .add-property-col { padding-left: 1rem; padding-right: 1rem; }
}

/* Page H1 — one per page for SEO; compact under header */
.add-property-page-h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
  margin: 0 0 0.65rem 0;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
@media (min-width: 576px) {
  .add-property-page-h1 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }
}

.add-property-wrapper {
  padding: 0.9rem 1rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}
@media (min-width: 576px) {
  .add-property-wrapper {
    padding: 1rem 1.15rem;
  }
}

.step-visible { display: block !important; }
.step-hidden { display: none !important; }

/* Step wizard — compact, professional (Bangla labels) */
.add-property-steps-wrapper {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 0.65rem 0.5rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(23, 59, 69, 0.08);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.add-property-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 0.2rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.add-property-steps::-webkit-scrollbar { display: none; }

.add-property-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
  max-width: 5.5rem;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.2s ease;
  text-align: center;
  flex-shrink: 1;
  z-index: 1;
}
.add-property-step:focus-visible {
  outline: 2px solid var(--brand-primary, #173b45);
  outline-offset: 3px;
  border-radius: 8px;
}
.add-property-step:hover {
  transform: translateY(-2px);
}
.add-property-step:hover .add-property-step-dot {
  box-shadow: 0 4px 14px rgba(23, 59, 69, 0.12);
}

.add-property-step-dot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #94a3b8;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.add-property-step-num {
  display: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.add-property-step-icon {
  display: block;
}

.add-property-step-title {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0;
  line-height: 1.25;
  transition: color 0.2s ease;
  word-break: break-word;
  hyphens: auto;
}
@media (min-width: 400px) {
  .add-property-step-title {
    font-size: 0.72rem;
  }
}
@media (min-width: 576px) {
  .add-property-step-title {
    font-size: 0.78rem;
  }
}

/* Pending state */
.add-property-step .add-property-step-dot {
  background: #fff;
  color: #94a3b8;
  border-color: #e2e8f0;
}

/* Completed state */
.add-property-step.completed .add-property-step-dot {
  background: linear-gradient(135deg, var(--brand-primary, #173b45) 0%, #0f2a30 100%);
  color: #fff;
  border-color: var(--brand-primary, #173b45);
  box-shadow: 0 4px 16px rgba(23, 59, 69, 0.25);
}
.add-property-step.completed .add-property-step-dot .add-property-step-icon { display: block; }
.add-property-step.completed .add-property-step-dot .add-property-step-num { display: none; }
.add-property-step.completed .add-property-step-title {
  color: var(--brand-primary, #173b45);
  font-weight: 600;
}

/* Active state */
.add-property-step.active .add-property-step-dot {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border-color: #059669;
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.3);
}
.add-property-step.active .add-property-step-dot .add-property-step-icon { display: block; }
.add-property-step.active .add-property-step-dot .add-property-step-num { display: none; }
.add-property-step.active .add-property-step-title {
  color: #059669;
  font-weight: 700;
}

/* Connector line */
.add-property-step-line {
  position: absolute;
  top: 24px;
  left: calc(50% + 24px);
  right: -3px;
  height: 3px;
  background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 2px;
  z-index: 0;
  overflow: hidden;
}
.add-property-step:last-child .add-property-step-line { display: none; }

.add-property-step.completed .add-property-step-line {
  background: linear-gradient(90deg, var(--brand-primary, #173b45) 0%, rgba(23, 59, 69, 0.6) 100%);
}
.add-property-step.active .add-property-step-line {
  background: linear-gradient(90deg, #059669 0%, #94a3b8 100%);
}

/* Cards */
.add-property-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(23, 59, 69, 0.07);
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.add-property-card-header {
  background: linear-gradient(135deg, var(--brand-primary, #173b45) 0%, #0b1220 100%);
  color: #fff;
  border: none;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  position: relative;
}
.add-property-card-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc107 0%, #006847 50%, var(--brand-primary) 100%);
}
.add-property-card-body { padding: 0.85rem 1rem; background: #fff; }

/* Property type radio buttons — compact & modern */
.prop-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.cat-item { display: none; }
.cat-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.cat-label:hover {
  background: #e2e8f0;
  border-color: var(--brand-primary, #173b45);
  color: var(--brand-primary, #173b45);
}
.cat-item:checked + .cat-label {
  background: var(--brand-primary, #173b45);
  border-color: var(--brand-primary, #173b45);
  color: #fff;
  box-shadow: 0 2px 8px rgba(23, 59, 69, 0.25);
}

/* Bills checkboxes */
.bills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}
.bill-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.bill-checkbox:hover { border-color: var(--brand-primary); }
.bill-input { display: none; }
.bill-checkbox .custom-check {
  width: 18px;
  height: 18px;
  border: 2px solid #ced4da;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.bill-input:checked + .custom-check {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.bill-input:checked + .custom-check::before {
  content: '✓';
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  display: block;
  text-align: center;
  line-height: 14px;
}

/* Image upload areas */
.upload-area-addnew {
  min-height: 112px;
  border: 2px dashed #ced4da;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  overflow: hidden;
}
.upload-area-addnew:hover {
  border-color: var(--brand-primary);
  background: rgba(23, 59, 69, 0.04);
}
.upload-area-addnew.has-image {
  border-style: solid;
  padding: 0;
}
.upload-area-addnew .img-preview-wrap {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
}
.upload-area-addnew .img-preview-wrap .img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-area-addnew .img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-area-addnew .upload-placeholder {
  text-align: center;
  color: #6c757d;
}
.upload-area-addnew .img-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0.9;
}
.upload-area-addnew .img-remove:hover { opacity: 1; }

/* Description editor (Quill) — responsive & modern */
.description-editor-block {
  width: 100%;
}
.description-editor-hint {
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}
.description-editor-wrapper {
  width: 100%;
  min-height: 150px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.description-editor-wrapper:focus-within {
  border-color: var(--brand-primary, #173b45);
  box-shadow: 0 0 0 3px rgba(23, 59, 69, 0.12);
}
.description-editor-wrapper .ql-toolbar {
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.description-editor-wrapper .ql-toolbar .ql-formats {
  margin-right: 0.5rem;
}
.description-editor-wrapper .ql-toolbar .ql-picker,
.description-editor-wrapper .ql-toolbar button {
  padding: 0.35rem 0.5rem;
}
.description-editor-wrapper .ql-container {
  border: none;
  font-size: 0.95rem;
  min-height: 130px;
  font-family: inherit;
}
.description-editor-wrapper .ql-editor {
  min-height: 130px;
  padding: 0.65rem 0.85rem;
  line-height: 1.5;
  color: #334155;
}
.description-editor-wrapper .ql-editor.ql-blank::before {
  color: #94a3b8;
  font-style: normal;
}
@media (max-width: 768px) {
  .description-editor-wrapper {
    min-height: 140px;
    border-radius: 10px;
  }
  .description-editor-wrapper .ql-toolbar {
    padding: 0.4rem 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .description-editor-wrapper .ql-toolbar::-webkit-scrollbar {
    display: none;
  }
  .description-editor-wrapper .ql-container,
  .description-editor-wrapper .ql-editor {
    min-height: 120px;
    padding: 0.6rem 0.75rem;
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .description-editor-wrapper .ql-editor {
    min-height: 110px;
    padding: 0.55rem 0.65rem;
  }
  .description-editor-hint {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
  }
}

/* Step nav (step-nav, step-btn used in blade) */
.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid rgba(23, 59, 69, 0.06);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  min-height: 40px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.step-btn i {
  font-size: 1.1em;
  opacity: 0.9;
}
.step-btn-prev {
  background: #fff;
  border: 2px solid #e2e8f0;
  color: #475569;
}
.step-btn-prev:hover {
  background: #fff;
  border-color: var(--brand-primary, #173b45);
  color: var(--brand-primary, #173b45);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(23, 59, 69, 0.12);
}
.step-btn-next {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
}
.step-btn-next:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}
.step-btn-save {
  background: linear-gradient(135deg, var(--brand-primary, #173b45) 0%, #0f2a30 100%);
  color: #fff;
}
.step-btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 59, 69, 0.3);
}

.add-property-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 16px;
}
.add-property-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: none;
}
.add-property-step-btn-prev {
  background: #fff;
  border: 1px solid #dee2e6;
  color: #6c757d;
}
.add-property-step-btn-prev:hover { background: #f8f9fa; transform: translateY(-1px); }
.add-property-step-btn-next {
  background: #28a745;
  color: #fff;
}
.add-property-step-btn-next:hover { background: #218838; transform: translateY(-1px); }
.add-property-step-btn-save {
  background: var(--brand-primary, #173b45);
  color: #fff;
}
.add-property-step-btn-save:hover { transform: translateY(-1px); }

/* Responsive — small devices */
@media (max-width: 768px) {
  .add-property-main {
    padding: 0.15rem 0 1rem;
  }
  .add-property-section-wrap {
    padding-top: 0.35rem !important;
    padding-bottom: 0.5rem !important;
  }
  .add-property-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 100%;
    width: 100%;
  }
  .add-property-wrapper {
    padding: 1rem 0.75rem;
    border-radius: 12px;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    max-width: calc(100% + 0.5rem);
  }
  .add-property-steps-wrapper {
    padding: 0.75rem 0.45rem;
    margin-bottom: 1.1rem;
    border-radius: 12px;
  }
  .add-property-steps { gap: 4px; }
  .add-property-step {
    min-width: 0;
    flex: 1 1 0;
    max-width: 4.75rem;
  }
  .add-property-step-dot {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .add-property-step-line {
    top: 22px;
    left: calc(50% + 22px);
    right: -2px;
    height: 3px;
  }
  .add-property-step-title {
    font-size: 0.62rem;
    margin-top: 5px;
    line-height: 1.2;
  }
  .add-property-card {
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  .add-property-card-header {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  .add-property-card-body {
    padding: 1rem;
  }
  .cat-label {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  .bills-container {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .bill-checkbox {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
  .upload-area-addnew {
    min-height: 100px;
    border-radius: 10px;
  }
  .upload-area-addnew .upload-placeholder .small,
  .upload-area-addnew .upload-placeholder small {
    font-size: 0.7rem;
  }
  .upload-area-addnew .img-remove {
    width: 24px;
    height: 24px;
    top: 8px;
    right: 8px;
  }
  .step-nav {
    padding: 0.65rem 0.75rem;
    margin-top: 0.75rem;
    border-radius: 10px;
    flex-direction: row;
    gap: 0.5rem;
  }
  .step-nav-right {
    flex: 1;
    justify-content: flex-end;
  }
  .step-nav-right .step-btn {
    min-height: 42px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  .step-btn-prev {
    padding: 0.65rem 1rem;
  }
  .add-property-section-title {
    font-size: 0.95rem;
  }
  .form-floating > label,
  .form-control,
  .form-select {
    font-size: 16px; /* prevents zoom on iOS */
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .add-property-wrapper { padding: 0.75rem 0.5rem; }
  .add-property-steps-wrapper { padding: 0.65rem 0.35rem; }
  .add-property-step {
    min-width: 0;
    max-width: 4.25rem;
  }
  .add-property-step-dot {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  .add-property-step-line {
    top: 20px;
    left: calc(50% + 20px);
    right: -2px;
  }
  .add-property-step-title { font-size: 0.58rem; }
  .add-property-type-row .col-6 { flex: 0 0 50%; max-width: 50%; }
  .bills-container { grid-template-columns: 1fr 1fr; }
  .add-property-card-body { padding: 0.75rem; }
}

/* Tighter form grid spacing */
.add-property-wrapper .row.g-3 {
  --bs-gutter-y: 0.65rem;
  --bs-gutter-x: 0.75rem;
}
