/* ==========================================================================
   Landlord funnel: preview, editor, publish (mobile first)
   ========================================================================== */
.lf-page { padding: 1rem 0 6rem; }
.container-narrow { max-width: 760px; }
.lf-page h1 { color: #1e3a5f; font-size: 1.35rem; line-height: 1.3; margin-bottom: 0.4rem; }
.lf-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; }
.lf-lead { color: #374151; margin-bottom: 1.2rem; }
.lf-center { text-align: center; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.05rem; font-weight: 600; }
.is-disabled { opacity: 0.55; pointer-events: none; }
.lf-inline-icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 0.35rem; color: #1e3a5f; }

/* Status card with completeness meter */
.lf-status { display: flex; flex-direction: column; gap: 1rem; background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-top: 4px solid #f59e0b; }
.lf-status.is-ready { border-top-color: #16a34a; }
.lf-meter { --p: 0; --c: #f59e0b; width: 96px; height: 96px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(closest-side, #fff 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #e5e7eb 0); }
.is-ready .lf-meter { --c: #16a34a; }
.lf-meter strong { font-size: 1.35rem; color: #1e3a5f; }
.lf-status-sub { color: #4b5563; margin-bottom: 0.8rem; }
.lf-checks { list-style: none; margin-bottom: 1.1rem; display: grid; gap: 0.35rem; }
.lf-checks li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.95rem; }
.lf-check-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.lf-checks .ok .lf-check-icon { color: #16a34a; }
.lf-checks .todo .lf-check-icon { color: #d97706; }
.lf-checks .required a { font-weight: 600; color: #b45309; }
.lf-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.lf-source { margin-top: 0.8rem; font-size: 0.85rem; color: #6b7280; }

/* Preview of the listing */
.lf-preview-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; margin: 2rem 0 0.6rem; font-weight: 600; }
.lf-preview { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.lf-gallery { position: relative; display: grid; grid-template-columns: 1fr; gap: 4px; background: #e5e7eb; }
.lf-gallery img { width: 100%; height: 220px; object-fit: cover; display: block; }
.lf-gallery img:not(:first-child) { display: none; }
.lf-gallery-more { position: absolute; right: 0.6rem; bottom: 0.6rem; background: rgba(17,24,39,0.75); color: #fff; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem; }
.lf-gallery-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: #4b5563; padding: 1rem; text-align: center; }
.lf-empty-icon { width: 36px; height: 36px; color: #2563eb; }
.lf-preview-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.lf-preview-title { font-size: 1.3rem; color: #1e3a5f; line-height: 1.3; }
.lf-preview-location { color: #6b7280; margin: 0.2rem 0 0.8rem; }
.lf-preview-main h4 { margin: 1.4rem 0 0.6rem; color: #1e3a5f; }
.lf-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding: 0.8rem 0; border-top: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; margin-bottom: 1rem; color: #374151; }
.lf-description { color: #374151; }
.lf-rooms { list-style: none; display: grid; gap: 0.4rem; }
.lf-rooms li { background: #f8fafc; border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.95rem; }
.lf-rooms strong { margin-right: 0.4rem; }
.lf-preview-price { background: #f8fafc; border-radius: 10px; padding: 1rem; display: grid; gap: 0.6rem; align-self: start; }

/* Feature chips (shared with the property page) */
.feature-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.feature-chips li { display: inline-flex; align-items: center; gap: 0.4rem; background: #eff6ff; color: #1e3a5f; border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.9rem; font-weight: 500; }
.chip-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Editor */
.lf-edit-head { margin-bottom: 1rem; }
.lf-progress { height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; margin: 0.6rem 0 0.3rem; }
.lf-progress span { display: block; height: 100%; background: #2563eb; }
.lf-progress-label { font-size: 0.9rem; color: #4b5563; }
.lf-section { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 0.75rem; }
.lf-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 1rem 1.1rem; min-height: 56px; font-weight: 600; color: #1e3a5f; }
.lf-section > summary::-webkit-details-marker { display: none; }
.lf-section > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); margin-left: 0.4rem; flex-shrink: 0; transition: transform 0.15s; }
.lf-section[open] > summary::after { transform: rotate(-135deg); }
.lf-section > summary span:first-child { flex: 1; }
.lf-section[open] > summary { border-bottom: 1px solid #eef0f3; }
.lf-section > :not(summary) { margin-left: 1.1rem; margin-right: 1.1rem; }
.lf-section > :nth-child(2) { margin-top: 1rem; }
.lf-section > :last-child { margin-bottom: 1.1rem; }
.lf-badge { font-size: 0.8rem; font-weight: 600; border-radius: 999px; padding: 0.15rem 0.6rem; display: inline-flex; align-items: center; }
.lf-badge.todo { background: #fef3c7; color: #92400e; }
.lf-badge.ok { color: #16a34a; }
.lf-badge-icon { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 0.8rem; }
.form-row .grow { flex: 1; }
.w-zip { flex: 0 0 120px; }
.form-group.is-missing input, .form-group.is-missing textarea, .form-group.is-missing select { border-color: #f59e0b; background: #fffbeb; }
.form-group.is-required label::after { content: ' – fehlt'; color: #b45309; font-weight: 600; font-size: 0.85rem; }
html[lang="en"] .form-group.is-required label::after { content: ' – missing'; }
html[lang="es"] .form-group.is-required label::after { content: ' – falta'; }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; }
.input-suffix input { padding-right: 2rem; }
.lf-toggles { display: grid; grid-template-columns: 1fr; gap: 0.2rem; margin-bottom: 1rem; }
.lf-toggle { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; cursor: pointer; }
.lf-toggle input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #2563eb; }
.lf-toggle small { display: block; color: #6b7280; }
.lf-amenities { border: none; margin-bottom: 1rem; }
.lf-amenities legend { font-weight: 600; color: #374151; margin-bottom: 0.5rem; font-size: 0.95rem; }
.lf-chip-check { display: inline-block; margin: 0 0.4rem 0.5rem 0; cursor: pointer; }
.lf-chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lf-chip-check span { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.35rem 0.85rem; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; font-size: 0.92rem; }
.lf-chip-check input:checked + span { background: #eff6ff; border-color: #2563eb; color: #1e3a5f; font-weight: 500; }
.lf-chip-check input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.lf-image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.lf-image { position: relative; border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.lf-image img { width: 100%; height: 110px; object-fit: cover; display: block; }
.lf-image label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; padding: 0.35rem 0.5rem; min-height: 36px; cursor: pointer; }
.lf-image-delete { color: #b91c1c; }
.lf-upload { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; border: 2px dashed #93c5fd; border-radius: 10px; padding: 1.25rem; cursor: pointer; color: #1e3a5f; text-align: center; background: #f8fbff; }
.is-missing .lf-upload { border-color: #f59e0b; background: #fffbeb; }
.lf-upload small { color: #6b7280; font-weight: 400; }
.lf-upload-icon { width: 32px; height: 32px; color: #2563eb; }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lf-upload-count { margin-top: 0.5rem; color: #166534; font-size: 0.9rem; }
.lf-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 0.6rem; padding: 0.75rem 0; background: linear-gradient(rgba(248,249,250,0), #f8f9fa 30%); }
.lf-savebar .btn { flex: 1; }

/* Publish */
.lf-summary { display: flex; gap: 0.9rem; align-items: center; background: #fff; border-radius: 10px; padding: 0.75rem; margin: 1rem 0 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.lf-summary img { width: 84px; height: 64px; object-fit: cover; border-radius: 6px; }
.lf-summary div { display: flex; flex-direction: column; }
.lf-summary span { color: #6b7280; font-size: 0.9rem; }
.lf-summary-score { color: #16a34a !important; font-weight: 600; }
.lf-publish-form { background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.input-reveal { position: relative; }
.input-reveal input { padding-right: 3rem; }
.btn-reveal { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: none; background: none; cursor: pointer; display: grid; place-items: center; }
.lf-confirm { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.5rem 0 1.2rem; cursor: pointer; font-size: 0.95rem; color: #374151; }
.lf-confirm input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; accent-color: #2563eb; }
.lf-confirm.has-error { color: #991b1b; }
.has-error input { border-color: #dc2626; }
.lf-publish-form > .error { color: #dc2626; font-size: 0.85rem; margin: -0.8rem 0 1rem; }
.lf-trust { list-style: none; display: grid; gap: 0.3rem; margin: 1rem 0 0.6rem; color: #374151; font-size: 0.92rem; }
.lf-trust .lf-inline-icon { color: #16a34a; }
.lf-mail-icon { margin: 1.5rem 0 0.5rem; }
.lf-big-icon { width: 56px; height: 56px; color: #2563eb; }
.lf-center form { margin: 1.2rem 0 0.8rem; }

@media (min-width: 480px) {
    .lf-toggles { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: repeat(3, 1fr); }
    .lf-image-grid { grid-template-columns: repeat(3, 1fr); }
    .lf-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 768px) {
    .lf-page { padding: 2rem 0 4rem; }
    .lf-page h1 { font-size: 1.7rem; }
    .lf-status { flex-direction: row; gap: 1.75rem; padding: 1.75rem; }
    .lf-meter { width: 120px; height: 120px; }
    .lf-meter strong { font-size: 1.6rem; }
    .lf-gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 160px 160px; }
    .lf-gallery img { height: 100%; }
    .lf-gallery img:not(:first-child) { display: block; }
    .lf-gallery img:first-child { grid-row: span 2; }
    .lf-gallery.single { grid-template-columns: 1fr; grid-template-rows: 320px; }
    .lf-gallery-empty { grid-column: 1 / -1; grid-row: 1 / -1; }
    .lf-preview-body { flex-direction: row; padding: 1.75rem; }
    .lf-preview-main { flex: 1; }
    .lf-preview-price { width: 280px; flex-shrink: 0; }
    .lf-image-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Property detail page
   ========================================================================== */
.property-page { padding-bottom: 5rem; }
.pd-gallery { position: relative; margin: 0 -1rem 1.25rem; }
.pd-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pd-gallery-track::-webkit-scrollbar { display: none; }
.pd-gallery-item { flex: 0 0 100%; scroll-snap-align: start; border: none; padding: 0; background: #e5e7eb; cursor: zoom-in; }
.pd-gallery-item img { width: 100%; height: 260px; object-fit: cover; display: block; }
.pd-gallery-count { position: absolute; right: 0.75rem; bottom: 0.75rem; background: rgba(17,24,39,0.72); color: #fff; font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px; pointer-events: none; }
.pd-gallery-all { display: none; }
.pd-lightbox { border: none; padding: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: #111827; }
.pd-lightbox::backdrop { background: rgba(17,24,39,0.9); }
.pd-lightbox-track { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 3.5rem 0.5rem 1rem; align-items: center; }
.pd-lightbox-track img { max-width: min(100%, 1400px); height: auto; border-radius: 4px; }
.pd-lightbox-close { position: fixed; top: 0.5rem; right: 0.75rem; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,0.15); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; z-index: 2; }
.property-location { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; }
.pd-worksite { display: inline-flex; align-items: center; background: #ecfdf5; color: #166534; border-radius: 999px; padding: 0.15rem 0.7rem; font-weight: 600; font-size: 0.92rem; }
.pd-worksite .lf-inline-icon { color: #166534; }
.pd-facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin: 0.8rem 0 1rem; }
.pd-facts li { display: flex; align-items: center; gap: 0.5rem; background: #fff; border-radius: 8px; padding: 0.6rem 0.8rem; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.pd-facts strong { font-size: 1.15rem; color: #1e3a5f; }
.pd-facts span { color: #4b5563; font-size: 0.92rem; }
.pd-fact-icon { width: 22px; height: 22px; color: #2563eb; flex-shrink: 0; }
.pd-highlights li { background: #ecfdf5; color: #14532d; }
.pd-description.is-clamped { max-height: 13.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.pd-rooms { list-style: none; display: grid; gap: 0.5rem; }
.pd-rooms li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; background: #fff; border-radius: 8px; padding: 0.6rem 0.8rem; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.pd-rooms span { color: #4b5563; }
.pd-room-icon { width: 20px; height: 20px; color: #2563eb; }
.pd-subhead { font-size: 1rem; color: #374151; margin: 1rem 0 0.5rem; }
.pd-note { color: #4b5563; font-size: 0.93rem; margin-top: 0.6rem; }
.pd-pricelist { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1.25rem; background: #fff; border-radius: 8px; padding: 0.9rem 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.pd-pricelist dt { color: #4b5563; }
.pd-pricelist dd { font-weight: 600; color: #1f2937; text-align: right; }
.pd-price-flags { list-style: none; margin-top: 0.6rem; display: grid; gap: 0.2rem; }
.pd-price-flags .lf-inline-icon { color: #16a34a; }
.pd-map { height: 280px; border-radius: 10px; background: #e8eef5 linear-gradient(135deg, #eef2f7 25%, #e3e9f1 25%, #e3e9f1 50%, #eef2f7 50%, #eef2f7 75%, #e3e9f1 75%) 0 0 / 40px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; padding: 1rem; margin: 0.6rem 0 0.3rem; overflow: hidden; }
.pd-map.is-loaded { display: block; padding: 0; }
.pd-map small { color: #4b5563; max-width: 320px; }
.pd-map .btn { background: #fff; }
.distances-card { margin-top: 1rem; }
.inquiry-card h2 { font-size: 1.2rem; color: #1e3a5f; margin-bottom: 0.2rem; }
.pd-inquiry { margin-top: 0.8rem; }
.pd-inquiry .form-group { margin-bottom: 0.8rem; }
.pd-inquiry label { font-size: 0.88rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pd-privacy { font-size: 0.8rem; color: #6b7280; margin-top: 0.6rem; }
.landlord-card h2 { font-size: 1.2rem; }
.pd-mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 12px rgba(0,0,0,0.08); transition: transform 0.2s; }
.pd-mobile-cta strong { color: #1e3a5f; font-size: 1.1rem; }
.pd-mobile-cta small { color: #6b7280; }
.pd-mobile-cta.is-hidden { transform: translateY(110%); }
.pd-mobile-cta .btn { flex-shrink: 0; font-weight: 600; }

@media (min-width: 480px) {
    .pd-facts { grid-template-columns: repeat(4, 1fr); }
    .pd-facts li { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
}
@media (min-width: 768px) {
    .pd-gallery { margin: 0 0 1.5rem; border-radius: 12px; overflow: hidden; }
    .pd-gallery-track { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 6px; overflow: hidden; }
    .pd-gallery.single .pd-gallery-track { grid-template-columns: 1fr; grid-template-rows: 420px; }
    .pd-gallery-item { flex: none; }
    .pd-gallery-item:first-child { grid-row: span 2; }
    .pd-gallery-item:nth-child(n+6) { display: none; }
    .pd-gallery-item img { height: 100%; transition: opacity 0.15s; }
    .pd-gallery-item:hover img { opacity: 0.92; }
    .pd-gallery-count { display: none; }
    .pd-gallery-all { display: inline-flex; align-items: center; position: absolute; right: 1rem; bottom: 1rem; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 0.5rem 0.9rem; cursor: pointer; font-weight: 500; min-height: 44px; }
    .property-sidebar { width: 370px; }

    .pd-mobile-cta { display: none; }
    .property-page { padding-bottom: 2rem; }
}
@media (min-width: 768px) and (min-height: 980px) { .pd-sticky { position: sticky; top: 1rem; } }
