/* ==================================================================
   Add Listing — step rail  (.hzs-*)
   ==================================================================

   Scoped under .hzf-page throughout, so this cannot reach the
   homepage, the search page or the listing page. It reads the
   --hzf-* tokens the form already declares, which in turn defer to
   the --hz-* set property.css owns: one ink, one hairline, the same
   10px/6px radii. The one colour it does introduce is the accent
   below, and only because the token it defers to does not exist yet.
   ================================================================== */

/* Re-asserted rather than relied upon. The conditional fields need
   [hidden] to beat any display rule a class sets, property-pages.css
   says so today, and this page should not break if that file is
   reorganised out from under it. Identical declaration, so while both
   exist they are indistinguishable. */
.hzf-page [hidden] {
    display: none !important;
}

.hzf-page .hzf-cadastral-intro {
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px solid var(--hzf-line, #e7e9ee);
}

.hzf-page .hzf-subhead {
    margin: 0 0 6px;
    color: var(--hzf-ink, #12141a);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- field info tips ----------
   The tip is absolutely placed, so it takes no room until it opens.
   Hover (fine pointers) and keyboard focus show it here; a tap toggles
   it, and Escape or a tap elsewhere closes it, in the page script.
   `data-hzf-tip-off` holds it shut after Escape while the pointer or
   focus is still on the button. */
html .hzf-page .hzf-labelrow {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin: 0 0 6px;
}

html .hzf-page .hzf-labelrow > .hzf-label {
    margin: 0;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field > .hzf-labelrow > .hzf-label {
    margin: 0;
    color: #071636;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-labelrow {
    margin: 0;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-labelrow {
    margin: 0 0 8px;
}

html .hzf-page .hzf-tip__btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: -4px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #66728a;
    cursor: pointer;
}

html .hzf-page .hzf-tip__btn > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font: italic 700 10px/1 Georgia, "Times New Roman", serif;
}

html .hzf-page .hzf-tip__btn:hover,
html .hzf-page .hzf-tip__btn[aria-expanded="true"] {
    color: var(--hzf-accent, #0745D9);
}

html .hzf-page .hzf-tip__btn:focus-visible {
    outline: 2px solid var(--hzf-accent, #0745D9);
    outline-offset: 1px;
}

html .hzf-page .hzf-tip {
    position: absolute;
    z-index: 90;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    display: block;
    width: max-content;
    max-width: min(280px, calc(100vw - 48px));
    padding: 8px 10px;
    border-radius: 8px;
    background: #071636;
    color: #fff;
    box-shadow: 0 6px 18px rgba(7, 22, 54, .18);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    text-align: start;
    white-space: normal;
}

html .hzf-page .hzf-tip[hidden] {
    display: none;
}

html .hzf-page .hzf-labelrow:not([data-hzf-tip-off]) > .hzf-tip__btn:focus-visible + .hzf-tip[hidden] {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    html .hzf-page .hzf-labelrow:not([data-hzf-tip-off]) > .hzf-tip__btn:hover + .hzf-tip[hidden] {
        display: block;
    }
}

/* ---------- amenity groups ---------- */
html .hzf-page .hzf-amen-group + .hzf-amen-group {
    margin-top: 16px;
}

html .hzf-page .hzf-amen-group__title {
    margin: 0 0 8px;
    color: var(--hzf-ink, #12141a);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
}

/* ---------- the accent ----------

   Hagzi's primary action colour moves from red to #0745D9.
   property.css is gaining --hagzi-primary for it; this page does not
   wait on that file, so every use carries the literal as a fallback
   and is right either way round.

   Declared as its own token rather than by redefining --hzf-red,
   because --hzf-red still has a job on this page. The error text, the
   bad-field borders, the validation summary, the rejected-photo alert
   and the at-the-limit photo count are semantic red: they mean
   something is wrong, not something is Hagzi, and they must not follow
   the brand when it moves. The required asterisk stays red on the same
   reasoning -- it is the one mark that pairs with those errors.

   Tints are rgba of the literal rather than a mix of the token on
   purpose: a colour-mix() the browser cannot resolve is invalid at
   computed-value time and takes the property with it, and these only
   ever sit on white anyway. */
.hzf-page {
    --hzf-accent: var(--hagzi-primary, #0745D9);
    --hzf-accent-dark: var(--hagzi-primary-dark, #0638B0);
    --hzf-accent-tint: rgba(7, 69, 217, .07);
    --hzf-accent-edge: rgba(7, 69, 217, .22);
}

/* Rules property-pages.css owns, restated here rather than edited
   there: that file is being rewritten for the listing page in
   parallel and is not this task's to touch.

   The `html` on the focus group is specificity and nothing else. That
   group is written `.hzf-page a:focus-visible` over there, and this
   stylesheet is emitted before the link to it, so matching the
   selector exactly would lose on source order. One type selector is
   the smallest thing that settles it. */
html .hzf-page a:focus-visible,
html .hzf-page button:focus-visible,
html .hzf-page input:focus-visible,
html .hzf-page select:focus-visible,
html .hzf-page textarea:focus-visible {
    outline-color: var(--hzf-accent);
}

/* Flat fill, white text, a darker purple on hover. No gradient and no
   shadow, which is how the button already was -- only the hue moves. */
.hzf-page .hzf-btn--primary {
    border-color: var(--hzf-accent);
    background: var(--hzf-accent);
}

.hzf-page .hzf-btn--primary:hover {
    border-color: var(--hzf-accent-dark);
    background: var(--hzf-accent-dark);
}

/* Secondary keeps its white face and neutral border at rest; the
   hover is a wash rather than a fill, so it cannot be mistaken for
   the primary sitting next to it. */
.hzf-page .hzf-btn--ghost:hover {
    border-color: var(--hzf-accent);
    background: var(--hzf-accent-tint);
    color: var(--hzf-accent-dark);
}

/* The little icon at each step heading. Brand decoration rather than a
   warning, so it moves with the brand; left red it would read as eight
   alerts down the page. */
.hzf-page .hzf-i {
    stroke: var(--hzf-accent);
}

.hzf-page .hzf-check__box {
    accent-color: var(--hzf-accent);
}

.hzf-page .hzf-check:has(.hzf-check__box:checked) {
    border-color: var(--hzf-accent);
    background: var(--hzf-accent-tint);
}

/* Cars-style selectors, adapted to Hagzi's existing form. The native
   select remains in the form as the submitted and validated value;
   this layer only improves the interaction and can be rebuilt safely
   after the page's Vue mount. */
.hzf-page .hzf-select--enhanced::after {
    display: none;
}

.hzf-page .hzf-select--enhanced {
    z-index: 1;
}

.hzf-page .hzf-select--enhanced.is-open {
    z-index: 70;
}

.hzf-page .hzf-select--enhanced .hzf-select__el {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.hzf-page .hzf-combobox__button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--hz-field-line, #80868f);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--hzf-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    text-align: start;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.hzf-page .hzf-combobox__button:hover {
    border-color: #b8bec8;
    background: var(--hzf-fill-soft, #f8f9fb);
}

.hzf-page .hzf-combobox__button:focus-visible {
    border-color: var(--hzf-accent);
    outline: 2px solid var(--hzf-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--hzf-accent-tint);
}

.hzf-page .hzf-combobox__button[disabled] {
    cursor: not-allowed;
    opacity: .55;
}

.hzf-page .hzf-combobox__value {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hzf-page .hzf-combobox__value.is-placeholder {
    color: #6b7280;
    font-weight: 400;
}

.hzf-page .hzf-combobox__chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #7b8492;
    transition: transform .18s ease;
}

.hzf-page .hzf-select--enhanced.is-open .hzf-combobox__chevron {
    transform: rotate(180deg);
}

.hzf-page .hzf-combobox__popover {
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    inset-inline: 0;
    display: flex;
    max-height: min(320px, 52vh);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--hzf-line-strong);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(7, 22, 54, .16);
}

.hzf-page .hzf-combobox__popover[hidden] {
    display: none !important;
}

.hzf-page .hzf-combobox__search {
    position: relative;
    flex: 0 0 auto;
    padding: 8px;
    border-bottom: 1px solid var(--hzf-line, #e7e9ee);
    background: #fff;
}

.hzf-page .hzf-combobox__search-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 20px;
    width: 16px;
    height: 16px;
    color: #7b8492;
    transform: translateY(-50%);
    pointer-events: none;
}

.hzf-page .hzf-combobox__search-input {
    display: block;
    width: 100%;
    height: 40px;
    border: 1px solid var(--hz-field-line, #80868f);
    border-radius: 8px;
    padding: 0 12px;
    padding-inline-start: 38px;
    background: #fff;
    color: var(--hzf-ink);
    font: inherit;
    font-size: 13px;
}

.hzf-page .hzf-combobox__search-input:focus {
    border-color: var(--hzf-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--hzf-accent-tint);
}

.hzf-page .hzf-combobox__options {
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
    overscroll-behavior: contain;
}

.hzf-page .hzf-combobox__option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-radius: 7px;
    padding: 10px;
    background: transparent;
    color: var(--hzf-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    text-align: start;
    cursor: pointer;
}

.hzf-page .hzf-combobox__option:hover,
.hzf-page .hzf-combobox__option:focus-visible {
    background: var(--hzf-fill-soft, #f3f4f6);
}

.hzf-page .hzf-combobox__option:focus-visible {
    outline: 2px solid var(--hzf-accent);
    outline-offset: -2px;
}

.hzf-page .hzf-combobox__option.is-selected {
    background: var(--hzf-accent-tint);
    color: var(--hzf-accent);
}

.hzf-page .hzf-combobox__check {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.hzf-page .hzf-combobox__empty {
    margin: 0;
    padding: 12px 10px;
    color: var(--hzf-muted);
    font-size: 13px;
}

.hzf-page .hzf-field--bad .hzf-combobox__button,
.hzf-page .hzf-combobox__button[aria-invalid="true"] {
    border-color: var(--hzf-red);
    background: #fffafa;
}

@media (max-width: 767px) {
    .hzf-page .hzf-combobox__button {
        min-height: 50px;
    }

    .hzf-page .hzf-combobox__option {
        min-height: 44px;
        font-size: 14px;
    }
}

/* Two columns need more than the single column's 880px. */
.hzf-page .hzf-wrap {
    max-width: 1180px;
}

.hzf-page .hzs-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* min-width:0 on the content column: without it a wide child — the
   amenities grid, a long file name — sets the column's minimum to its
   own content width and pushes the grid past the viewport without
   ever reporting overflow on itself. */
.hzf-page .hzs-main {
    min-width: 0;
}

/* ---------- the rail ---------- */

.hzf-page .hzs-rail {
    position: sticky;
    top: 16px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--hzf-line);
    border-radius: var(--hzf-radius);
    background: #fff;
}

.hzf-page .hzs-rail__title {
    margin: 0 0 10px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--hzf-muted);
}

.hzf-page .hzs-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hzf-page .hzs-step {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 8px;
    border: 1px solid transparent;
    border-radius: var(--hzf-radius-sm);
    background: transparent;
    color: var(--hzf-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: start;
    cursor: pointer;
}

.hzf-page .hzs-step:hover {
    background: var(--hzf-fill);
    color: var(--hzf-ink);
}

.hzf-page .hzs-step[aria-current="step"] {
    background: var(--hzf-accent-tint);
    color: var(--hzf-ink);
    font-weight: 700;
}

.hzf-page .hzs-step__label {
    min-width: 0;
}

/* The marker. A ring by default, the same radio shape the reference
   uses; filled with a tick once the step's required fields are
   genuinely answered. */
.hzf-page .hzs-dot {
    position: relative;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid var(--hzf-line-strong);
    border-radius: 50%;
    background: #fff;
}

.hzf-page .hzs-step[aria-current="step"] .hzs-dot {
    border-color: var(--hzf-accent);
    box-shadow: 0 0 0 3px var(--hzf-accent-edge);
}

.hzf-page .hzs-step[data-hzs-state="done"] .hzs-dot,
.hzf-page .hzs-step[data-hzs-state="noted"] .hzs-dot {
    border-color: var(--hzf-accent);
    background: var(--hzf-accent);
}

/* One visual language for every step: an empty ring until it is
   answered, a tick once it is. An optional step differs only by its
   "Optional" word -- a dashed or grey ring read as "in progress". */
.hzf-page .hzs-step[data-hzs-state="done"] .hzs-dot::after,
.hzf-page .hzs-step[data-hzs-state="noted"] .hzs-dot::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: 0;
    border-left: 0;
    transform: rotate(42deg);
}

/* A step carrying a validation failure. The rail is the only place
   that can say *where* the problem is without scrolling to it. */
.hzf-page .hzs-step[data-hzs-state="bad"] .hzs-dot {
    border-color: var(--hzf-red);
    background: var(--hzf-red-tint);
}

.hzf-page .hzs-step[data-hzs-state="bad"] .hzs-dot::after {
    content: "!";
    position: absolute;
    left: -2px;
    right: -2px;
    top: -2px;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    color: var(--hzf-red-dark);
}

.hzf-page .hzs-step[data-hzs-state="bad"] {
    color: var(--hzf-red-dark);
}

.hzf-page .hzs-tag {
    margin-inline-start: auto;
    padding-inline-start: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #6b7280;
}

/* ---------- progress ---------- */

.hzf-page .hzs-progress {
    margin-top: 12px;
    padding: 0 8px;
}

.hzf-page .hzs-progress__track {
    height: 3px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: var(--hzf-line);
    overflow: hidden;
}

.hzf-page .hzs-progress__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--hzf-accent);
    transition: width .18s ease;
}

.hzf-page .hzs-progress__text {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--hzf-muted);
}

/* ---------- panel headings ---------- */

.hzf-page .hzs-panel {
    scroll-margin-top: 16px;
}

.hzf-page .hzs-eyebrow {
    margin-inline-start: auto;
    padding-inline-start: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #6b7280;
    white-space: nowrap;
}

/* ==================================================================
   Add Listing — the photograph gallery  (.hzg-*)
   ==================================================================

   Its own namespace, and every rule it needs declared here, rather
   than reusing the .hzf-drop / .hzf-files rules in
   public/themes/property/property-pages.css. That file belongs to
   another session and has been rewritten twice underneath this page
   already; the gallery should not be one of those rewrites away from
   falling apart. Colours are still the form's own tokens, with a
   literal fallback on each in case that file is the thing that goes
   missing.
   ================================================================== */

/* ---------- the drop zone ---------- */

.hzf-page .hzg-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 168px;
    margin: 0;
    padding: 26px 18px;
    border: 1.5px dashed var(--hzf-line-strong, #d6dae1);
    border-radius: var(--hzf-radius, 10px);
    background: var(--hzf-fill-soft, #fafbfc);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.hzf-page .hzg-drop:hover {
    border-color: #b9c0ca;
    background: #f6f7f9;
}

/* Dragged-over and keyboard-focused look the same because they mean
   the same thing: this is the target, let go here. */
.hzf-page .hzg-drop[data-hzg-over="1"] {
    border-style: solid;
    border-color: var(--hzf-accent);
    background: var(--hzf-accent-tint);
}

.hzf-page .hzg-drop:focus-within {
    border-color: var(--hzf-accent);
    outline: 2px solid var(--hzf-accent);
    outline-offset: 2px;
}

/* Invisible but still a tab stop. display:none or visibility:hidden
   would take the file picker out of the keyboard's reach entirely,
   which for some readers is the only way to it. */
.hzf-page .hzg-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hzf-page .hzg-drop__glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hzf-line, #e7e9ee);
    border-radius: 50%;
    background: #fff;
    color: var(--hzf-accent);
}

.hzf-page .hzg-drop__glyph svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hzf-page .hzg-drop__lead {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--hzf-ink, #12141a);
}

.hzf-page .hzg-drop__link {
    color: var(--hzf-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hzf-page .hzg-drop__hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--hzf-muted, #6b7280);
}

/* ---------- what was refused, and why ---------- */

.hzf-page .hzg-alert {
    margin: 12px 0 0;
    padding: 9px 12px;
    border: 1px solid #f2c4c6;
    border-radius: var(--hzf-radius-sm, 6px);
    background: var(--hzf-red-tint, #fdecec);
    font-size: 13px;
    line-height: 1.55;
    color: var(--hzf-red-dark, #b3171c);
}

/* ---------- the thumbnails ---------- */

.hzf-page .hzg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.hzf-page .hzg-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hzf-line, #e7e9ee);
    border-radius: 8px;
    background: #fff;
    cursor: grab;
}

.hzf-page .hzg-item[data-hzg-dragging="1"] {
    opacity: .45;
    cursor: grabbing;
}

.hzf-page .hzg-item__frame {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eceef2;
}

.hzf-page .hzg-item__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-select: none;
    user-select: none;
}

.hzf-page .hzg-item__badge,
.hzf-page .hzg-item__pos {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    z-index: 2;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}

.hzf-page .hzg-item__badge {
    padding: 3px 7px;
    background: var(--hzf-accent);
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Every tile after the first says its position, so the order the
   message will use can be read off the grid instead of counted. */
.hzf-page .hzg-item__pos {
    min-width: 19px;
    padding: 3px 5px;
    background: rgba(18, 20, 26, .6);
    text-align: center;
}

.hzf-page .hzg-item__name {
    display: block;
    padding: 6px 8px;
    border-top: 1px solid var(--hzf-line, #e7e9ee);
    font-size: 11px;
    line-height: 1.4;
    color: var(--hzf-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hzf-page .hzg-item__quality {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0 8px 7px;
    list-style: none;
    color: #5b4511;
    font-size: 11px;
    line-height: 1.4;
}

.hzf-page .hzg-item__quality li::before {
    content: "•";
    margin-inline-end: 5px;
}

.hzf-page .hzg-quality {
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid #c9d5ea;
    border-radius: 10px;
    background: #f5f8fd;
    color: var(--hzf-body, #3c414c);
}

.hzf-page .hzg-quality__title {
    margin: 0;
    color: var(--hzf-ink, #12141a);
    font-size: 15px;
    line-height: 1.4;
}

.hzf-page .hzg-quality__summary,
.hzf-page .hzg-quality__condition,
.hzf-page .hzg-quality__local {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

.hzf-page .hzg-quality__local {
    color: var(--hzf-muted, #6b7280);
}

.hzf-page .hzg-quality__cover {
    min-height: 44px;
    margin: 10px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--hzf-accent, #0745d9);
    border-radius: 7px;
    background: #fff;
    color: var(--hzf-accent, #0745d9);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.hzf-page .hzg-quality__cover:hover {
    background: var(--hzf-accent, #0745d9);
    color: #fff;
}

.hzf-page .hzg-quality__cover:focus-visible {
    outline: 3px solid #4921a8;
    outline-offset: 2px;
}

/* Always-visible actions below the image; labels wrap in either locale. */
.hzf-page .hzg-item__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
}

.hzf-page .hzg-item__actions > summary {
    min-height: 36px;
    padding: 8px;
    color: var(--hzf-accent, #0745d9);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.hzf-page .hzg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid #767b86;
    border-radius: 5px;
    background: #fff;
    color: #12141a;
    font: inherit;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.hzf-page .hzg-btn:hover:not(:disabled) {
    border-color: var(--hzf-accent);
    background: var(--hzf-accent);
    color: #fff;
}

.hzf-page .hzg-btn:disabled { opacity: .6; cursor: default; }
.hzf-page .hzg-btn:focus-visible { outline: 3px solid #4921a8; outline-offset: -3px; }
.hzf-page .hzg-btn[aria-pressed="true"] { font-weight: 700; }

/* The one place a touch drag may start. touch-action:none here and
   nowhere else, so a finger on the picture still scrolls the page
   instead of being trapped by the grid. */
.hzf-page .hzg-item__grip {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .93);
    color: #4a5160;
    cursor: grab;
    touch-action: none;
    opacity: 0;
    transition: opacity .13s ease;
}

.hzf-page .hzg-item__grip svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    stroke: none;
}

.hzf-page .hzg-item:hover .hzg-item__grip,
.hzf-page .hzg-item:focus-within .hzg-item__grip {
    opacity: 1;
}

@media (hover: none) {
    .hzf-page .hzg-item__grip { opacity: 1; }
}

/* ---------- the caption and the count ---------- */

.hzf-page .hzg-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin: 13px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--hzf-line, #e7e9ee);
}

.hzf-page .hzg-foot__note {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--hzf-body, #3c414c);
}

.hzf-page .hzg-foot__count {
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--hzf-ink, #12141a);
}

.hzf-page .hzg-foot__count[data-hzg-full="1"] {
    color: var(--hzf-red, #d92228);
}

/* ---------- the video link ---------- */

.hzf-page .hzg-video {
    margin: 20px 0 0;
    padding: 17px 0 0;
    border-top: 1px solid var(--hzf-line, #e7e9ee);
}

/* setError marks the control aria-invalid and puts hzf-field--bad on
   its .hzf-field wrapper. This field has no such wrapper, so the state
   is drawn from the attribute instead -- the same red and the same
   tint the other fields get, so a bad video link does not look like a
   different kind of mistake. */
.hzf-page .hzg-video .hzf-input[aria-invalid="true"] {
    border-color: var(--hzf-red, #d92228);
    background: #fffafa;
}

.hzf-page .hzg-optional {
    margin-inline-start: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #6b7280;
}

/* ---------- listing video: link or upload ---------- */

.hzf-page .hzv [hidden],
.hzv-progress[hidden],
.hzv-progress [hidden] {
    display: none !important;
}

.hzf-page .hzv-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 12px;
}

.hzf-page .hzv-choice__opt,
.hzf-page .hzv-btn,
.hzv-progress .hzv-btn {
    min-height: 44px;
    padding-block: 8px;
    padding-inline: 16px;
    border: 1px solid var(--hzf-line, #e7e9ee);
    border-radius: 999px;
    background: #fff;
    color: var(--hzf-ink, #12141a);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hzf-page .hzv-choice__opt {
    flex: 1 1 140px;
}

.hzf-page .hzv-choice__opt[aria-pressed="true"] {
    border-color: var(--hzf-red, #d92228);
    background: #fff5f5;
    color: var(--hzf-red, #d92228);
}

.hzf-page .hzv-choice__opt:focus-visible,
.hzf-page .hzv-btn:focus-visible,
.hzf-page .hzv-file:focus-visible,
.hzv-progress .hzv-btn:focus-visible {
    outline: 2px solid var(--hzf-red, #d92228);
    outline-offset: 2px;
}

.hzf-page .hzv-btn--danger {
    color: var(--hzf-red, #d92228);
}

.hzf-page .hzv-btn--quiet {
    min-height: 36px;
    padding-inline: 10px;
    border-color: transparent;
    text-decoration: underline;
}

.hzf-page .hzv-btn[disabled] {
    opacity: .6;
    cursor: progress;
}

.hzf-page .hzv-sub {
    font-size: 13px;
}

.hzf-page .hzv-file {
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    padding: 12px;
    border: 1px dashed #c9ced8;
    border-radius: 12px;
    background: #fafbfc;
    font: inherit;
    font-size: 14px;
}

.hzf-page .hzv-file[aria-invalid="true"],
.hzf-page .hzv .hzf-input[aria-invalid="true"] {
    border-color: var(--hzf-red, #d92228);
    background: #fffafa;
}

.hzf-page .hzv-chosen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.hzf-page .hzv-current {
    margin: 6px 0 14px;
    padding: 12px;
    border: 1px solid var(--hzf-line, #e7e9ee);
    border-radius: 12px;
}

.hzf-page .hzv-current__title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
}

.hzf-page .hzv-current__media {
    display: block;
    inline-size: 100%;
    max-inline-size: 360px;
    max-block-size: 240px;
    border-radius: 8px;
    background: #000;
}

.hzf-page .hzv-current__yt {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.hzf-page .hzv-current__thumb {
    inline-size: 160px;
    block-size: auto;
    border-radius: 8px;
}

.hzf-page .hzv-current__actions,
.hzv-progress__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block-start: 10px;
}

.hzf-page .hzv-current__status:empty {
    display: none;
}

.hzf-page .hzv-note {
    margin: 0;
    font-size: 13px;
    color: #5b6270;
}

.hzv-progress {
    margin-block-start: 10px;
}

.hzv-progress__bar {
    block-size: 8px;
    border-radius: 999px;
    background: #eef0f4;
    overflow: hidden;
}

.hzv-progress__fill {
    display: block;
    block-size: 100%;
    inline-size: 0;
    background: var(--hzf-red, #d92228);
    transition: inline-size .2s linear;
}

.hzv-progress__label {
    margin: 6px 0 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.hzv-progress__msg {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--hzf-red, #d92228);
}

.hzf-page .hzg-strong {
    font-weight: 700;
    color: var(--hzf-ink, #12141a);
}

/* A 390px viewport leaves about 320px inside the card. Two columns of
   roughly 155px is the most it can hold without the grid deciding to
   be one wide column of enormous pictures. */
@media (max-width: 599px) {
    .hzf-page .hzg-grid {
        grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
        gap: 10px;
    }

    .hzf-page .hzg-drop {
        min-height: 148px;
        padding: 20px 14px;
    }

    .hzf-page .hzg-drop__lead {
        font-size: 14px;
    }

}

/* ---------- mobile: the rail becomes a sticky chip strip ----------

   A 248px column cannot survive a 390px viewport, and a vertical list
   of eight would push the first field below the fold. It turns into a
   horizontally scrollable row of chips pinned to the top of the
   viewport, with the progress line above it, so the same two facts —
   where you are, how much is left — stay visible while you type.

   overflow-x lives on the scroller itself and the row's items are
   flex:0 0 auto, so the strip scrolls without the page ever gaining
   width. */
@media (max-width: 959px) {
    .hzf-page .hzs-layout {
        display: block;
    }

    .hzf-page .hzs-rail {
        top: 0;
        z-index: 20;
        margin: 0 0 16px;
        padding: 8px 0 9px;
        border-width: 0 0 1px;
        border-radius: 0;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: saturate(180%) blur(6px);
    }

    .hzf-page .hzs-rail__title {
        display: none;
    }

    .hzf-page .hzs-progress {
        margin: 8px 0 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-direction: row-reverse;
    }

    .hzf-page .hzs-progress__track {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
    }

    .hzf-page .hzs-progress__text {
        flex: 0 0 auto;
        font-size: 11px;
    }

    .hzf-page .hzs-steps {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hzf-page .hzs-steps::-webkit-scrollbar {
        display: none;
    }

    .hzf-page .hzs-steps > li {
        flex: 0 0 auto;
        min-width: 0;
    }

    .hzf-page .hzs-step {
        gap: 7px;
        padding: 6px 11px;
        border-color: var(--hzf-line);
        border-radius: 999px;
        background: #fff;
        font-size: 12px;
        white-space: nowrap;
    }

    .hzf-page .hzs-step[aria-current="step"] {
        border-color: var(--hzf-accent);
    }

    .hzf-page .hzs-dot {
        width: 13px;
        height: 13px;
        border-width: 2px;
    }

    .hzf-page .hzs-step[data-hzs-state="done"] .hzs-dot::after,
    .hzf-page .hzs-step[data-hzs-state="noted"] .hzs-dot::after {
        left: 2px;
        top: -1px;
        width: 3px;
        height: 6px;
        border-width: 1.5px;
    }

    .hzf-page .hzs-step[data-hzs-state="bad"] .hzs-dot::after {
        line-height: 13px;
        font-size: 9px;
    }

    /* The chip already carries the state; the word would double the
       strip's width to repeat it. */
    .hzf-page .hzs-tag {
        display: none;
    }

    .hzf-page .hzs-eyebrow {
        display: none;
    }

    /* Clears the pinned strip when a step is jumped to. Kept in step
       with the measurement the script takes. */
    .hzf-page .hzs-panel {
        scroll-margin-top: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hzf-page .hzs-progress__fill,
    .hzf-page .hzg-drop,
    .hzf-page .hzg-item__bar,
    .hzf-page .hzg-item__grip {
        transition: none;
    }
}

/* Match the Cars Add Listing layout and selector treatment while
   retaining Hagzi's property fields and blue brand colour. */
html .hzf-page.hzf-cars-design {
    min-height: calc(100vh - 50px);
    padding-bottom: 72px;
    background: #fff;
    color: #071636;
    font-family: Roboto, sans-serif;
}

html .hzf-page.hzf-cars-design .hzf-wrap {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
}

html .hzf-page.hzf-cars-design .hzf-head {
    max-width: 874px;
    margin-inline: auto;
    padding-top: 28px;
    padding-bottom: 4px;
}

html .hzf-page.hzf-cars-design .hzf-head__title {
    color: #071636;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

html .hzf-page.hzf-cars-design .hzf-head__sub {
    margin-top: 7px;
    color: #66728a;
    font-size: 13px;
    line-height: 1.55;
}

html .hzf-page.hzf-cars-design .hzs-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 620px);
    justify-content: center;
    gap: 44px;
    padding-top: 24px;
}

html .hzf-page.hzf-cars-design .hzs-main,
html .hzf-page.hzf-cars-design .hzf-form {
    width: 100%;
    min-width: 0;
}

html .hzf-page.hzf-cars-design .hzf-form {
    display: grid;
    gap: 16px;
}

html .hzf-page.hzf-cars-design .hzs-rail {
    position: sticky;
    top: 74px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: thin;
}

html .hzf-page.hzf-cars-design .hzs-rail__title {
    display: none;
}

html .hzf-page.hzf-cars-design .hzs-steps {
    gap: 2px;
}

html .hzf-page.hzf-cars-design .hzs-step {
    min-height: 38px;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    background: transparent;
    color: #66728a;
    font-size: 13px;
    font-weight: 500;
}

html .hzf-page.hzf-cars-design .hzs-step:hover {
    background: #f3f4f6;
    color: #071636;
}

html .hzf-page.hzf-cars-design .hzs-step[aria-current="step"] {
    border: 0;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e5e7eb;
    color: #071636;
    font-weight: 700;
}

html .hzf-page.hzf-cars-design .hzs-progress {
    margin: 4px 10px 10px;
    padding: 0;
    border: 0;
}

html .hzf-page.hzf-cars-design .hzf-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px 22px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(7, 22, 54, .04);
}

html .hzf-page.hzf-cars-design .hzf-card__head {
    min-height: 0;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

html .hzf-page.hzf-cars-design .hzf-card__head > .hzf-i,
html .hzf-page.hzf-cars-design .hzs-eyebrow {
    display: none;
}

html .hzf-page.hzf-cars-design .hzf-card__title {
    color: #071636;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
}

html .hzf-page.hzf-cars-design .hzf-grid {
    column-gap: 14px;
    row-gap: 14px;
}

html .hzf-page.hzf-cars-design .hzf-field--third {
    flex: 1 1 calc(50% - 7px);
}

html .hzf-page.hzf-cars-design .hzf-label {
    color: #071636;
    font-size: 12.5px;
    font-weight: 500;
}

html .hzf-page.hzf-cars-design .hzf-input,
html .hzf-page.hzf-cars-design .hzf-textarea {
    min-height: 44px;
    border: 1px solid var(--hz-field-line, #80868f);
    border-radius: 8px;
    padding: 11px 14px;
    color: #071636;
    font-size: 14px;
    font-weight: 500;
}

html .hzf-page.hzf-cars-design .hzf-input:focus,
html .hzf-page.hzf-cars-design .hzf-textarea:focus {
    border-color: var(--hzf-accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--hzf-accent);
}

/* Cars uses one compact label/value row for choice fields. */
html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) {
    position: relative;
    display: grid;
    flex: 1 1 100%;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 55%);
    align-items: center;
    gap: 14px;
    min-height: 52px;
    border-top: 1px solid #edeff2;
    padding: 0 8px;
}

html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) > .hzf-label {
    margin: 0;
    font-size: 13.5px;
}

html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) > .hzf-select {
    width: 100%;
    min-width: 0;
}

html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) > .hzf-hint {
    display: none;
}

html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) > .hzf-err {
    grid-column: 1 / -1;
    margin: -6px 0 8px;
}

html .hzf-page.hzf-cars-design .hzf-combobox__button {
    min-height: 46px;
    justify-content: flex-end;
    border: 0;
    border-radius: 6px;
    padding: 10px 8px;
    background: transparent;
    color: #66728a;
    font-size: 13.5px;
}

html .hzf-page.hzf-cars-design .hzf-combobox__button:hover {
    border: 0;
    background: #f3f4f6;
    color: #071636;
}

html .hzf-page.hzf-cars-design .hzf-combobox__value:not(.is-placeholder) {
    color: #071636;
}

html .hzf-page.hzf-cars-design .hzf-combobox__popover {
    top: calc(100% - 2px);
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: min(320px, 100%);
    border-color: #e5e7eb;
    border-radius: 10px;
}

html .hzf-page.hzf-cars-design .hzf-combobox__option {
    padding: 9px 10px;
    font-size: 13px;
}

@media (max-width: 1023.98px) {
    html .hzf-page.hzf-cars-design .hzf-wrap {
        max-width: 652px;
    }

    html .hzf-page.hzf-cars-design .hzf-head {
        max-width: 620px;
    }

    html .hzf-page.hzf-cars-design .hzs-layout {
        display: block;
        padding-top: 18px;
    }

    html .hzf-page.hzf-cars-design .hzs-rail {
        position: sticky;
        top: 0;
        z-index: 20;
        margin-bottom: 16px;
        padding: 10px 0 11px;
        border-bottom: 1px solid #e5e7eb;
        background: #fff;
    }

    html .hzf-page.hzf-cars-design .hzs-steps {
        display: none;
    }

    html .hzf-page.hzf-cars-design .hzs-progress {
        display: flex;
        margin: 0;
        align-items: center;
        gap: 10px;
        flex-direction: row-reverse;
    }
}

@media (max-width: 767.98px) {
    html .hzf-page.hzf-cars-design {
        padding-bottom: 48px;
    }

    html .hzf-page.hzf-cars-design .hzf-wrap {
        max-width: none;
        padding-inline: 16px;
    }

    html .hzf-page.hzf-cars-design .hzf-head {
        padding-top: 22px;
    }

    html .hzf-page.hzf-cars-design .hzf-head__title {
        font-size: 22px;
    }

    html .hzf-page.hzf-cars-design .hzf-card {
        padding: 18px 16px 20px;
    }

    html .hzf-page.hzf-cars-design .hzf-field--half,
    html .hzf-page.hzf-cars-design .hzf-field--third {
        flex: 1 1 100%;
        grid-column: 1 / -1;
    }

    html .hzf-page.hzf-cars-design .hzf-field:has(> .hzf-select) {
        grid-template-columns: minmax(0, 1fr) minmax(145px, 52%);
        min-height: 54px;
        padding-inline: 4px;
    }

    html .hzf-page.hzf-cars-design .hzf-combobox__button {
        min-height: 52px;
    }

    html .hzf-page.hzf-cars-design .hzf-combobox__popover {
        width: min(320px, 92vw);
    }
}

/*
 * Cars Characteristics parity: every Hagzi value occupies one full
 * row.  The native form controls still own validation and submission;
 * this block only gives them the same label / value rhythm used by
 * Cars Add Listing.
 */
html .hzf-page.hzf-cars-design .hzf-grid {
    gap: 0;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select),
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input),
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 55%);
    align-items: center;
    gap: 14px;
    min-height: 54px;
    margin: 0;
    border-top: 0;
    border-bottom: 1px solid #edeff2;
    padding: 0 8px;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-label,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-label,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) > .hzf-label {
    margin: 0;
    color: #071636;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    padding: 10px 8px;
    background: transparent;
    color: #071636;
    font-size: 13.5px;
    font-weight: 500;
    text-align: end;
    box-shadow: none;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input:hover {
    background: #f3f4f6;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input:focus {
    border: 0;
    outline: 2px solid var(--hzf-accent);
    outline-offset: -2px;
    background: #fff;
    box-shadow: none;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input::placeholder {
    color: #6b7280;
    font-weight: 400;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) > .hzf-check {
    width: auto;
    min-height: 46px;
    justify-self: end;
    justify-content: flex-end;
    border: 0;
    border-radius: 6px;
    padding: 10px 8px;
    background: transparent;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) > .hzf-check:hover {
    background: #f3f4f6;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-hint,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-hint,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) > .hzf-hint {
    display: none;
}

/* This new location instruction stays visible; existing compact-row hints keep their own policy. */
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-hint[data-hzf-location-help] {
    display: block;
    grid-column: 1 / -1;
    margin: 0 0 10px;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-hint[data-hzf-town-pin-note]:not([hidden]) {
    display: block;
    grid-column: 1 / -1;
    margin: 0 0 10px;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) > .hzf-err,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-err,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) > .hzf-err {
    grid-column: 1 / -1;
    margin: -4px 0 8px;
}

html .hzf-page.hzf-cars-design .hzf-req {
    color: #dc2626;
}

/* Long-form copy follows Cars' boxed Description fields, while each
   language still receives its own complete row. */
html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid {
    gap: 14px;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field {
    display: block;
    flex: 1 1 100%;
    min-height: 0;
    border: 0;
    padding: 0;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field > .hzf-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field > .hzf-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--hz-field-line, #80868f);
    border-radius: 8px;
    padding: 11px 14px;
    text-align: start;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field > .hzf-textarea {
    min-height: 148px;
    line-height: 1.6;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field > .hzf-input:hover {
    background: #fff;
}

html .hzf-page.hzf-cars-design #hzs-panel-words .hzf-grid > .hzf-field > .hzf-input:focus {
    border: 1px solid var(--hzf-accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--hzf-accent);
}

@media (max-width: 767.98px) {
    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select),
    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input),
    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-check) {
        grid-template-columns: minmax(0, 1fr) minmax(140px, 52%);
        min-height: 56px;
        padding-inline: 4px;
    }

    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
        min-height: 52px;
    }
}

/* Typed values need a visible writing surface. Keep each field on its
   own row, but place the input below its label instead of flattening it
   into the selector-row treatment. */
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) {
    display: block;
    min-height: 0;
    border-top: 0;
    border-bottom: 1px solid #edeff2;
    padding: 14px 8px 16px;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-label {
    display: block;
    margin: 0 0 8px;
    color: #071636;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
    display: block;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--hz-field-line, #80868f);
    border-radius: 8px;
    padding: 11px 14px;
    background: #fff;
    color: #071636;
    font-size: 14px;
    font-weight: 500;
    text-align: start;
    box-shadow: none;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input:hover {
    border-color: #6b7280;
    background: #fff;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input:focus {
    border: 1px solid var(--hzf-accent);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--hzf-accent);
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-err {
    margin: 7px 0 0;
}

html .hzf-page .hzf-charcount {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

html .hzf-page .hzf-charcount[data-hzf-near] {
    color: #b45309;
    font-weight: 600;
}

html .hzf-page .hzf-charcount[data-hzf-full] {
    color: #dc2626;
    font-weight: 600;
}

html .hzf-page .hzf-photo-early {
    grid-column: 1 / -1;
    margin: -4px 0 8px;
    color: #b45309;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
}

html .hzf-page .hzf-photo-early[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) {
        padding: 13px 4px 15px;
    }

    html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
        min-height: 48px;
    }
}

html .hzf-page.hzf-cars-design [data-hzf-field="nearby_locations"] {
    margin-top: 24px;
    padding-top: 4px;
}

/* The Cars selector is one button spanning the complete row. Hagzi's
   native select remains the source of truth, while the surrounding
   field gets the same full-row hit area and open/hover treatment. */
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) {
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s ease;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select):hover,
html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select):has(> .hzf-select.is-open) {
    background: #f3f4f6;
}

html .hzf-page.hzf-cars-design .hzf-grid > .hzf-field:has(> .hzf-select) .hzf-combobox__button:hover {
    background: transparent;
}

html .hzf-page.hzf-cars-design .hzf-select--enhanced.is-open .hzf-combobox__chevron {
    transform: rotate(90deg);
}

@media (max-width: 767.98px) {
    html .hzf-page.hzf-cars-design [data-hzf-field="nearby_locations"] {
        margin-top: 20px;
    }
}

/* Price check. These rules stay in the head, outside #app. A <style>
   next to the price input is part of the in-page template, and the Vue
   mount drops it, which left the icon with no size and the tip printed
   as plain text under the field. */
html .hzf-page .hzpc { margin-top: 12px; }
html .hzf-page .hzpc__typical { margin: 0 0 6px; }
html .hzf-page .hzpc__warn {
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid #f1d39a;
    border-inline-start: 3px solid #d48a00;
    border-radius: var(--hzf-radius, 8px);
    background: #fff8e8;
    color: var(--hzf-body, #333);
    font-size: 13px;
    line-height: 1.6;
}
html .hzf-page .hzpc__warn p { margin: 0; }
html .hzf-page .hzpc__warning { font-weight: 600; }
html .hzf-page .hzpc__note { margin-top: 4px !important; }
html .hzf-page .hzpc__confirm { margin-top: 10px; }
html .hzf-page .hzpc__link { display: inline-block; margin-top: 4px; font-size: 13px; }

/* Under the price field, on the trailing edge, the same place as
   Zameen's "Price Check" chip. The price input stays full width. */
html .hzf-page .hzpc-tip {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

html .hzf-page .hzpc-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

html .hzf-page .hzpc-icon:focus-visible { outline: 2px solid var(--hzf-accent, #1a5fd0); outline-offset: 2px; }
html .hzf-page .hzpc-icon svg { width: 18px; height: 18px; display: none; flex: none; }
html .hzf-page .hzpc-icon[data-hzpc-state="idle"] [data-hzpc-glyph="idle"],
html .hzf-page .hzpc-icon[data-hzpc-state="ok"] [data-hzpc-glyph="ok"],
html .hzf-page .hzpc-icon[data-hzpc-state="warn"] [data-hzpc-glyph="warn"] { display: block; }
html .hzf-page .hzpc-icon[data-hzpc-state="ok"] { color: #15803d; }
html .hzf-page .hzpc-icon[data-hzpc-state="warn"] { color: #e11d48; }

html .hzf-page .hzpc-pop {
    display: none;
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    width: min(300px, 80vw);
    padding: 10px 12px;
    border: 1px solid #e2e4e8;
    border-radius: var(--hzf-radius, 8px);
    background: #fff;
    color: var(--hzf-body, #333);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    font-size: 13px;
    line-height: 1.6;
    text-align: start;
}

html .hzf-page .hzpc-pop p { margin: 0; }
html .hzf-page .hzpc-pop p + p { margin-top: 6px; }
html .hzf-page .hzpc-pop__advice { color: #6b7280; font-size: 12px; }
html .hzf-page .hzpc-tip[data-open] .hzpc-pop { display: block; }

@media (hover: hover) {
    html .hzf-page .hzpc-tip:hover .hzpc-pop,
    html .hzf-page .hzpc-tip:focus-within .hzpc-pop { display: block; }
}


.hzf-page .hzs-rail-publish {
    display: none;
}

.hzf-page [data-hzf-amenity-options] > summary {
    cursor: pointer;
    color: #071636;
}

.hzf-page [data-hzf-amenity-options] > summary > h2 {
    display: inline;
    margin-inline-start: 4px;
}

.hzf-page [data-hzf-amenity-options] > summary span {
    margin-inline-start: 4px;
    color: #66728a;
    font-size: 12px;
    font-weight: 500;
}

.hzf-page [data-hzf-amenity-options][open] > summary {
    margin-bottom: 14px;
}

@media (min-width: 1024px) {
    html .hzf-page.hzf-cars-design .hzf-wrap {
        max-width: 1160px;
    }

    html .hzf-page.hzf-cars-design .hzf-head {
        max-width: 1064px;
    }

    html .hzf-page.hzf-cars-design .hzs-layout {
        grid-template-columns: 210px minmax(0, 822px);
        gap: 32px;
    }

    html .hzf-page.hzf-cars-design .hzs-rail-publish {
        display: block;
        width: calc(100% - 20px);
        min-height: 44px;
        margin: 14px 10px 2px;
        padding: 8px 12px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: var(--hzf-accent);
        color: #fff;
        font-weight: 700;
    }

    .hzf-page .hzs-rail-publish:disabled {
        opacity: .72;
    }

    html .hzf-page.hzf-cars-design :is(#hzs-panel-listing, #hzs-panel-location, #hzs-panel-details, #hzs-panel-price) > .hzf-grid {
        column-gap: 14px;
    }

    html .hzf-page.hzf-cars-design :is(#hzs-panel-listing, #hzs-panel-location, #hzs-panel-details, #hzs-panel-price) > .hzf-grid > :is(.hzf-field--half, .hzf-field--third) {
        flex: 0 0 calc(50% - 7px);
        min-width: 0;
    }
}

/* Rental periods: one compact checkbox and its explicitly offered rate. */
.hzf-page .hzf-rental-periods {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.hzf-page .hzf-rental-period {
    display: grid;
    grid-template-columns: minmax(125px, .7fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding-block: 10px;
    border-block-end: 1px solid var(--hz-color-border, #e5e7eb);
}
.hzf-page .hzf-rental-period > .hzf-check { min-height: 44px; }
.hzf-page .hzf-rental-period__price { min-width: 0; }
.hzf-page .hzf-rental-period__price .hzf-label { font-size: .8125rem; }
.hzf-page .hzf-rental-period[hidden],
.hzf-page .hzf-rental-period__price[hidden],
.hzf-page .hzf-rental-periods[hidden] { display: none; }
@media (max-width: 480px) {
    .hzf-page .hzf-rental-period { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Keep the primary compatibility inputs in the submission without empty visual rows. */
.hzf-page .hzf-field:has(> [data-hzf-primary-price-entry][hidden]):not(:has([name="price_unit"])),
.hzf-page .hzf-field:has(> [data-hzf-rental-primary-choice][hidden]) { display: none; }

/* Keep helper rows below the controls instead of centring a shorter field beside them. */
html .hzf-page.hzf-cars-design :is(#hzs-panel-location, #hzs-panel-details) > .hzf-grid > .hzf-field {
    align-content: start;
}

/* Numeric details share the select row geometry while retaining a visible typing surface. */
html .hzf-page.hzf-cars-design #hzs-panel-details > .hzf-grid > .hzf-field:has(> .hzf-input) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 55%);
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 0 8px;
}
html .hzf-page.hzf-cars-design #hzs-panel-details > .hzf-grid > .hzf-field:has(> .hzf-input) > :is(.hzf-label, .hzf-labelrow) {
    margin: 0;
}
html .hzf-page.hzf-cars-design #hzs-panel-details > .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
    height: 48px;
    min-height: 48px;
    min-width: 0;
}

/* Grid children must not inherit the spacing intended for stacked amenity groups. */
html .hzf-page.hzf-flow .hzf-flow-amenities__groups > .hzf-amen-group {
    margin: 0;
    align-self: start;
}
html .hzf-page.hzf-flow .hzf-flow-amenities__groups .hzf-check {
    align-items: flex-start;
}
html .hzf-page.hzf-flow .hzf-flow-amenities__groups .hzf-check > input[type="checkbox"] {
    margin-block-start: 2px;
}
@media (max-width: 767px) {
    html .hzf-page.hzf-cars-design #hzs-panel-details > .hzf-grid > .hzf-field:has(> .hzf-input) {
        grid-template-columns: minmax(0, 1fr) minmax(145px, 52%);
        gap: 10px;
        padding-inline: 4px;
    }
    html .hzf-page.hzf-cars-design #hzs-panel-details > .hzf-grid > .hzf-field:has(> .hzf-input) > .hzf-input {
        height: 54px;
        min-height: 54px;
    }
}
