.ypi-uae-public-badge,
.ypi-uae-public-facts {
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
}

.ypi-uae-public-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.ypi-uae-public-badge a {
  color: var(--ypi-uae-primary, #089aad);
  font-weight: 700;
  text-decoration: none;
}

.ypi-uae-public-badge__permit {
  color: #334155;
  font-weight: 700;
}

.ypi-uae-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.ypi-uae-badge--manual_verified {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.ypi-uae-badge--pending {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.ypi-uae-badge--missing,
.ypi-uae-badge--failed,
.ypi-uae-badge--expired {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.ypi-uae-public-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.ypi-uae-public-facts div {
  padding: 12px;
  background: #f8fafc;
}

.ypi-uae-public-facts span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.ypi-uae-public-facts strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
}

@media (max-width: 768px) {
  .ypi-uae-public-facts {
    grid-template-columns: 1fr;
  }
}

.ypi-uae-submit-wrap,
.ypi-uae-submit-wrap * {
  box-sizing: border-box;
}

.ypi-uae-submit-wrap {
  --ypi-uae-submit-primary: var(--ypi-uae-primary, #089aad);
  max-width: 1180px;
  margin: 0 auto;
  color: #0f172a;
}

.ypi-uae-submit-form {
  display: grid;
  gap: 18px;
}

.ypi-uae-submit-section {
  border: 1px solid rgba(8, 154, 173, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fcfd);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .06);
  padding: 18px;
}

.ypi-uae-submit-section__head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(8, 154, 173, .12);
}

.ypi-uae-submit-section__head span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eaf8fb;
  color: #067f90;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ypi-uae-submit-section__head h3 {
  margin: 8px 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.ypi-uae-submit-section__head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.ypi-uae-submit-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.ypi-uae-submit-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ypi-uae-submit-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ypi-uae-submit-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ypi-uae-submit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ypi-uae-submit-field > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.ypi-uae-submit-field input,
.ypi-uae-submit-field select,
.ypi-uae-submit-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  padding: 9px 11px;
}

.ypi-uae-submit-field textarea {
  min-height: 140px;
  resize: vertical;
}

.ypi-uae-submit-field input:focus,
.ypi-uae-submit-field select:focus,
.ypi-uae-submit-field textarea:focus {
  border-color: var(--ypi-uae-submit-primary);
  box-shadow: 0 0 0 2px rgba(8, 154, 173, .12);
  outline: none;
}

.ypi-uae-submit-field small {
  color: #64748b;
  font-size: 12px;
}

.ypi-uae-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ypi-uae-feature-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.ypi-uae-feature-grid input {
  accent-color: var(--ypi-uae-submit-primary);
}

.ypi-uae-submit-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 0 18px;
}

.ypi-uae-submit-button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--ypi-uae-submit-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
  padding: 0 20px;
}

.ypi-uae-submit-actions p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.ypi-uae-submit-alert,
.ypi-uae-submit-notice {
  border-radius: 8px;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-weight: 600;
}

.ypi-uae-submit-alert--success {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.ypi-uae-submit-alert--error,
.ypi-uae-submit-notice {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.ypi-uae-submit-alert ul {
  margin: 8px 0 0 18px;
}

@media (max-width: 1024px) {
  .ypi-uae-submit-grid--4,
  .ypi-uae-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ypi-uae-submit-grid--2,
  .ypi-uae-submit-grid--3,
  .ypi-uae-submit-grid--4,
  .ypi-uae-feature-grid {
    grid-template-columns: 1fr;
  }

  .ypi-uae-submit-section {
    padding: 14px;
  }
}

/* v0.4.0 - mode-driven custom submission flow. */
.ypi-uae-submit-flow__empty{
  padding:14px 16px;
  border:1px solid rgba(8,154,173,.22);
  border-radius:8px;
  background:rgba(8,154,173,.08);
  color:#12333a;
  font-weight:600;
}
.ypi-uae-submit-section--mode{border-color:rgba(8,154,173,.24);}
.ypi-uae-submit-grid--auto{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.ypi-uae-field-node{min-width:0;}
.ypi-uae-field-node[data-ypi-submit-field="property_description"],
.ypi-uae-field-node[data-ypi-submit-field="photos"],
.ypi-uae-field-node[data-ypi-submit-field="features"]{grid-column:1/-1;}
@media (max-width:1024px){.ypi-uae-submit-grid--auto{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:680px){.ypi-uae-submit-grid--auto{grid-template-columns:1fr;}}

/* v0.4.4 - force Houzez/bootstrap-select wrappers inside the custom UAE submit flow
   to match the native YPI fields if theme assets initialize before our JS guard. */
.ypi-uae-submit-wrap .bootstrap-select,
.ypi-uae-submit-wrap .bootstrap-select > .dropdown-toggle,
.ypi-uae-submit-wrap .bootstrap-select > button.dropdown-toggle,
.ypi-uae-submit-wrap .bootstrap-select .btn.dropdown-toggle,
.ypi-uae-submit-wrap .bootstrap-select .btn-light.dropdown-toggle{
  width:100% !important;
  min-height:42px !important;
  height:42px !important;
  border-radius:8px !important;
  border:1px solid #cbd5e1 !important;
  background:#fff !important;
  box-shadow:none !important;
  color:#0f172a !important;
  font:inherit !important;
}
.ypi-uae-submit-wrap .bootstrap-select > .dropdown-toggle,
.ypi-uae-submit-wrap .bootstrap-select > button.dropdown-toggle{
  padding:9px 11px !important;
}
.ypi-uae-submit-wrap .bootstrap-select .filter-option,
.ypi-uae-submit-wrap .bootstrap-select .filter-option-inner,
.ypi-uae-submit-wrap .bootstrap-select .filter-option-inner-inner{
  display:flex !important;
  align-items:center !important;
  height:100% !important;
  color:#0f172a !important;
  font-weight:500 !important;
}
.ypi-uae-submit-wrap .bootstrap-select .dropdown-menu{
  border:1px solid rgba(8,154,173,.16) !important;
  border-radius:8px !important;
  box-shadow:0 16px 40px rgba(15,23,42,.14) !important;
}
.ypi-uae-submit-wrap select.ypi-uae-native-select{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
}

/* v0.4.5 - fast async media upload for standalone UAE submission. */
.ypi-uae-upload-box {
  border: 1px dashed rgba(8, 154, 173, .35);
  border-radius: 8px;
  background: #f7fcfd;
  padding: 10px;
}

.ypi-uae-upload-box__status {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.ypi-uae-upload-box__status[data-state="uploading"] { color: #0f6470; }
.ypi-uae-upload-box__status[data-state="complete"] { color: #047857; }
.ypi-uae-upload-box__status[data-state="error"] { color: #b45309; }

.ypi-uae-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ypi-uae-upload-preview__item {
  align-items: flex-end;
  background: linear-gradient(135deg, #eaf8fb, #f8fafc);
  background-position: center;
  background-size: cover;
  border: 1px solid #d8e7ea;
  border-radius: 8px;
  display: flex;
  height: 76px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 92px;
}

.ypi-uae-upload-preview__item span {
  background: rgba(15, 23, 42, .72);
  color: #fff;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 4px 6px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.ypi-uae-upload-preview__item.is-uploading::before {
  animation: ypiUaeUploadSpin .8s linear infinite;
  border: 2px solid rgba(8, 154, 173, .18);
  border-top-color: var(--ypi-uae-primary, #089aad);
  border-radius: 999px;
  content: "";
  height: 22px;
  left: 50%;
  margin: -11px 0 0 -11px;
  position: absolute;
  top: 42%;
  width: 22px;
}

.ypi-uae-upload-preview__item.is-complete { border-color: rgba(4, 120, 87, .35); }
.ypi-uae-upload-preview__item.is-error { border-color: rgba(180, 83, 9, .35); }

@keyframes ypiUaeUploadSpin {
  to { transform: rotate(360deg); }
}

/* v0.4.6 - critical submit state + premium loader feedback. */
.ypi-uae-submit-wrap.is-submitting {
  position: relative;
}

.ypi-uae-submit-loader {
  align-items: center;
  background: rgba(8, 154, 173, .08);
  border: 1px solid rgba(8, 154, 173, .22);
  border-radius: 8px;
  color: #0f6470;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
}

.ypi-uae-submit-loader[hidden] {
  display: none !important;
}

.ypi-uae-submit-loader__spinner {
  animation: ypiUaeUploadSpin .75s linear infinite;
  border: 2px solid rgba(8, 154, 173, .18);
  border-radius: 999px;
  border-top-color: var(--ypi-uae-primary, #089aad);
  display: inline-block;
  height: 18px;
  width: 18px;
}

.ypi-uae-submit-button[aria-busy="true"] {
  cursor: wait;
  opacity: .78;
}

.ypi-uae-upload-box__status[data-state="fallback"] { color: #b45309; }


/* v0.4.8 - Residential / Commercial property type picker */
.ypi-uae-field-node[data-ypi-submit-field="property_type"] {
  grid-column: 1 / -1;
}

.ypi-uae-property-type-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.ypi-uae-submit-field--property_type_group,
.ypi-uae-submit-field--property_type {
  min-width: 0;
}

@media (max-width: 720px) {
  .ypi-uae-property-type-picker {
    grid-template-columns: 1fr;
  }
}
