/* Portal UI. Author: pablo rotem */
.pre-portal,.pre-portal-auth{font-family:inherit;color:#17253a;max-width:1250px;margin:24px auto 80px;line-height:1.55}.pre-portal *{box-sizing:border-box}.pre-hero{display:flex;justify-content:space-between;align-items:center;gap:28px;background:linear-gradient(115deg,#0d2644,#126b8f);color:white;border-radius:22px;padding:34px 40px;margin-bottom:24px;box-shadow:0 12px 32px #12304a22}.pre-hero h1{color:white;font-size:clamp(26px,3vw,39px);margin:0 0 8px}.pre-hero p{color:#e1f1f8;margin:0}.pre-eyebrow{font-size:12px;text-transform:uppercase;font-weight:750;letter-spacing:.9px;margin-bottom:8px!important}.pre-portal-btn,.pre-actions button{display:inline-flex;justify-content:center;align-items:center;background:#13b99c;color:#07342f!important;padding:12px 24px;border:0;border-radius:12px;font-weight:800;text-decoration:none!important;cursor:pointer;white-space:nowrap}.pre-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.pre-stat,.pre-panel{background:#fff;border:1px solid #e3eaf1;box-shadow:0 4px 19px #1c3d5910;border-radius:16px}.pre-stat{padding:20px;display:flex;flex-direction:column;gap:5px}.pre-stat span{color:#62728a}.pre-stat strong{font-size:30px;line-height:1.2;color:#142b44}.pre-stat-icon{height:32px;width:32px;border-radius:9px;background:#e8f6f5;color:#119e8a;display:grid;place-items:center}.pre-portal-grid,.pre-edit-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;margin:20px 0}.pre-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pre-panel{padding:23px;margin-bottom:18px;min-width:0}.pre-panel h2{font-size:19px;color:#152d47;margin:0 0 16px}.pre-section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.pre-section-title h2{margin:0}.pre-section-title span,.pre-muted{color:#66788e;font-size:12px}.pre-bars{height:200px;display:flex;align-items:flex-end;gap:5px;padding-top:10px}.pre-bar{height:100%;flex:1;display:flex;align-items:flex-end}.pre-bar i{display:block;width:100%;border-radius:6px 6px 0 0;background:linear-gradient(#20c8b7,#0f83b3)}.pre-distribution>div{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #eff3f7}.pre-distribution strong{font-size:20px}.pre-table-scroll{overflow-x:auto}.pre-table-panel table{border-collapse:collapse;width:100%;min-width:630px}.pre-table-panel th,.pre-table-panel td{padding:12px;text-align:right;border-bottom:1px solid #ebf0f4;vertical-align:middle}.pre-table-panel th{color:#62728a;font-size:13px;font-weight:650}.pre-table-panel td small{display:block;color:#8494a4}.pre-pill{display:inline-block;border-radius:25px;padding:5px 12px;background:#eaf4fa;font-size:12px}.pre-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.pre-fields label{display:flex;flex-direction:column;gap:7px;font-weight:650;font-size:13px}.pre-fields .pre-wide{grid-column:1/-1}.pre-fields input,.pre-fields select,.pre-fields textarea{background:#fafcfe;border:1px solid #d7e0eb;border-radius:9px;padding:12px;color:#233348;width:100%;font:inherit}.pre-actions{display:flex;align-items:center;gap:20px;margin:16px 0 26px}.pre-notice{background:#e8f8f0;border-radius:10px;padding:14px 20px;margin-bottom:18px}.pre-portal-auth{padding:40px;background:#f6fafc;border-radius:18px}.pre-portal a{color:#08799b}@media(max-width:850px){.pre-stats{grid-template-columns:repeat(2,1fr)}.pre-portal-grid,.pre-edit-grid{grid-template-columns:1fr}.pre-hero{padding:27px;align-items:flex-start;flex-direction:column}}@media(max-width:480px){.pre-stats{grid-template-columns:1fr 1fr;gap:9px}.pre-stat{padding:14px}.pre-stat strong{font-size:24px}.pre-fields{grid-template-columns:1fr}.pre-fields .pre-wide{grid-column:auto}.pre-hero{border-radius:15px}.pre-actions{flex-direction:column;align-items:flex-start}}
/* Author: pablo rotem — account portal navigation */
.pra-portal-nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 14px;margin:10px 0 22px;background:#f0f6f9;border:1px solid #dae6ec;border-radius:15px}.pra-portal-nav a,.pra-portal-nav button{display:inline-flex;padding:9px 13px;border:0;background:#fff;border-radius:9px;text-decoration:none;color:#16576d;font:inherit;cursor:pointer}.pra-portal-nav form{margin:0}

/* Author: pablo rotem — dedicated sidebar-free property form */
body.pablo-re-publish-fullwidth #secondary,body.pablo-re-publish-fullwidth .widget-area,body.pablo-re-publish-fullwidth aside#secondary{display:none!important}
body.pablo-re-publish-fullwidth #primary,body.pablo-re-publish-fullwidth .content-area{width:100%!important;max-width:none!important;float:none!important;margin:0 auto!important}
body.pablo-re-publish-fullwidth .site-content>.ast-container,body.pablo-re-publish-fullwidth .ast-container{max-width:1500px}
.pre-publish-page{width:100%;max-width:1450px;margin-inline:auto}.pre-publish-page .pre-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.pre-publish-page .pre-panel{margin:0}.pre-publish-page select[multiple]{min-height:150px}.pre-publish-page .pre-custom-panel{grid-column:1/-1}.pre-publish-page .pre-form-note{color:#60758a;font-size:13px}.pre-publish-page input,.pre-publish-page select,.pre-publish-page textarea{min-width:0;max-width:100%}
@media(max-width:900px){.pre-publish-page .pre-edit-grid{grid-template-columns:1fr}}

/* Author: pablo rotem — property feature checkbox table */
.pre-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.pre-feature-check{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;padding:12px;border:1px solid #dce4eb;border-radius:9px;background:#fff;cursor:pointer}.pre-feature-check input{width:18px;height:18px;accent-color:#167f8c;margin:0;flex-shrink:0}.pre-feature-check:has(input:checked){background:#edf9f7;border-color:#168f83}.pre-feature-check span{line-height:1.5}@media(max-width:750px){.pre-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:450px){.pre-feature-grid{grid-template-columns:1fr}}

/* Author: pablo rotem — type cascade and upload styling */
.pre-type-cascade{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}.pre-type-cascade select{width:100%;min-width:0}.pre-image-upload{display:block;border:2px dashed #9cb7c6;border-radius:14px;padding:22px;background:#f5fafe}.pre-image-upload input[type=file]{display:block;width:100%;margin-top:12px}.pre-current-images{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:16px}.pre-current-images img{width:100%;height:105px;object-fit:cover;border-radius:10px}@media(max-width:650px){.pre-type-cascade{grid-template-columns:1fr}}

/* Author: pablo rotem — PHP 8.3/8.4, Astra RTL select text clipping fix (v1.15.1).
   Applies to actual publish form selectors, not generic/nonexistent theme classes. */
body .pre-portal.pre-publish-page form.pre-publish-form .pre-fields select,
body .pre-portal.pre-publish-page form.pre-publish-form .pre-type-cascade select,
body .pre-portal.pre-publish-page form.pre-publish-form select.pre-location-select {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: none !important;
    line-height: normal !important;
    padding: 0 18px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #172c42 !important;
    direction: rtl !important;
    text-align: right !important;
    text-align-last: right !important;
    vertical-align: middle !important;
    background-color: #f8fafc;
}
/* Keep intentionally multi-select fields tall rather than forcing them to 60px. */
body .pre-portal.pre-publish-page form.pre-publish-form .pre-fields select[multiple] {
    height: 170px !important;
    min-height: 170px !important;
    padding: 9px 14px !important;
    line-height: 1.7 !important;
}
body .pre-portal.pre-publish-page .pre-fields label > span {
    display: block;
    line-height: 1.6 !important;
    min-height: 24px;
}
@media(max-width: 600px) {
    body .pre-portal.pre-publish-page form.pre-publish-form .pre-fields select,
    body .pre-portal.pre-publish-page form.pre-publish-form .pre-type-cascade select,
    body .pre-portal.pre-publish-page form.pre-publish-form select.pre-location-select {
        height: 56px !important;
        min-height: 56px !important;
        font-size: 16px !important;
    }
}

/* Author: pablo rotem — v1.16: actual form grid wrapper, not just select width. */
body .pre-portal.pre-publish-page .pre-publish-form .pre-fields > label.pre-property-type-field {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}
body .pre-portal.pre-publish-page .pre-publish-form .pre-type-cascade {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}
body .pre-portal.pre-publish-page .pre-publish-form .pre-type-cascade > select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    text-overflow: ellipsis;
}
.pre-status-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pre-status-fieldset legend { font-weight: 650; font-size: 16px; margin-bottom: 14px; padding: 0; }
.pre-status-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
body .pre-portal .pre-status-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; min-width:0; padding: 14px; border: 1px solid #dce4eb; border-radius: 10px; background: #fff; cursor: pointer; }
body .pre-portal .pre-status-check input[type="checkbox"] { display: inline-block !important; width: 19px !important; height: 19px !important; min-height: 19px !important; margin: 0 !important; flex: 0 0 19px; accent-color: #167f8c; }
body .pre-portal .pre-status-check span { line-height: 1.5; overflow-wrap: anywhere; }
body .pre-portal .pre-status-check:has(input:checked) { background: #edf9f7; border-color: #168f83; }
@media(max-width: 900px) { .pre-status-grid {grid-template-columns: repeat(2,minmax(0,1fr));} }
@media(max-width: 650px) {
 body .pre-portal.pre-publish-page .pre-publish-form .pre-type-cascade {grid-template-columns: minmax(0,1fr) !important;}
 .pre-status-grid {grid-template-columns: minmax(0,1fr);}
}

.pre-dashboard-shell .pre-dashboard-tab-content{margin-top:14px}.pra-portal-nav a.is-active{background:#0f7180;color:#fff;border-color:#0f7180;text-decoration:none}.pre-portal[dir="ltr"],.pre-portal[dir="ltr"] .pre-panel,.pre-portal[dir="ltr"] .pre-hero,.pre-portal[dir="ltr"] label,.pre-portal[dir="ltr"] input,.pre-portal[dir="ltr"] select,.pre-portal[dir="ltr"] textarea{text-align:left;direction:ltr}.pre-dashboard-shell .pra-account{max-width:none;margin:0;padding:0}.pre-dashboard-shell .pra-card{max-width:none}.pre-dashboard-shell .pre-publish-page{max-width:none;margin:0;padding:0}


/* Author: pablo rotem — v1.25.2 publish-form width and bilingual overflow fix. */
body.pablo-re-publish-fullwidth .site-content,
body.pablo-re-publish-fullwidth #content,
body.pablo-re-publish-fullwidth .site-content > .ast-container,
body.pablo-re-publish-fullwidth .ast-container {
    width: 100% !important;
    max-width: 1680px !important;
}

body.pablo-re-publish-fullwidth .pre-dashboard-shell.pre-dashboard-tab-publish {
    width: min(1540px, calc(100vw - 48px)) !important;
    max-width: 1540px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.pablo-re-publish-fullwidth .pre-dashboard-shell.pre-dashboard-tab-publish .pre-dashboard-tab-content,
body.pablo-re-publish-fullwidth .pre-dashboard-shell.pre-dashboard-tab-publish .pre-publish-page {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

body.pablo-re-publish-fullwidth .pre-publish-page .pre-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

/* `pre-wide` sections (statuses/features) must span the complete publish form,
   not one half-column. This is the main cause of the cramped cards. */
body.pablo-re-publish-fullwidth .pre-publish-page .pre-edit-grid > .pre-wide {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
}

body.pablo-re-publish-fullwidth .pre-publish-page .pre-panel {
    padding: 26px !important;
    min-width: 0 !important;
    overflow: visible;
}

body.pablo-re-publish-fullwidth .pre-publish-page .pre-fields {
    gap: 17px 18px !important;
}

body.pablo-re-publish-fullwidth .pre-publish-page .pre-fields label,
body.pablo-re-publish-fullwidth .pre-publish-page .pre-fields label > span {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.pablo-re-publish-fullwidth .pre-publish-page .pre-fields select,
body.pablo-re-publish-fullwidth .pre-publish-page .pre-type-cascade select,
body.pablo-re-publish-fullwidth .pre-publish-page select.pre-location-select {
    font-size: 16px !important;
    padding-inline: 14px 34px !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

body.pablo-re-publish-fullwidth .pre-portal[dir="ltr"] .pre-fields select,
body.pablo-re-publish-fullwidth .pre-portal[dir="ltr"] .pre-type-cascade select,
body.pablo-re-publish-fullwidth .pre-portal[dir="ltr"] select.pre-location-select {
    direction: ltr !important;
    text-align: left !important;
    text-align-last: left !important;
}

body.pablo-re-publish-fullwidth .pre-portal[dir="rtl"] .pre-fields select,
body.pablo-re-publish-fullwidth .pre-portal[dir="rtl"] .pre-type-cascade select,
body.pablo-re-publish-fullwidth .pre-portal[dir="rtl"] select.pre-location-select {
    direction: rtl !important;
    text-align: right !important;
    text-align-last: right !important;
}

/* More room for the two property type selectors. */
body.pablo-re-publish-fullwidth .pre-publish-page .pre-type-cascade {
    grid-template-columns: minmax(230px, 1.15fr) minmax(230px, 1fr) !important;
    gap: 16px !important;
}

/* Status and feature cards: no text collision in Hebrew or English. */
body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 12px !important;
}
body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 12px !important;
}
body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-check,
body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-check {
    min-height: 54px;
    align-items: center !important;
}
body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-check span,
body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-check span {
    display: block;
    min-width: 0;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}

/* Keep upload/control text from being squeezed by browser-native file controls. */
body.pablo-re-publish-fullwidth .pre-publish-page .pre-image-upload {
    width: 100%;
    min-width: 0;
}
body.pablo-re-publish-fullwidth .pre-publish-page .pre-image-upload input[type="file"] {
    max-width: 100%;
}

/* Medium desktops/laptops: retain two form columns, reduce checkbox columns. */
@media (max-width: 1250px) {
    body.pablo-re-publish-fullwidth .pre-dashboard-shell.pre-dashboard-tab-publish {
        width: calc(100vw - 32px) !important;
    }
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-grid,
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
    }
}

/* Tablets: one panel per row and two checkbox columns. */
@media (max-width: 900px) {
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-edit-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-type-cascade {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-grid,
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Phones: one field/card per row. */
@media (max-width: 620px) {
    body.pablo-re-publish-fullwidth .pre-dashboard-shell.pre-dashboard-tab-publish {
        width: calc(100vw - 20px) !important;
    }
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-panel {
        padding: 18px !important;
    }
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-fields,
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-type-cascade,
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-status-grid,
    body.pablo-re-publish-fullwidth .pre-publish-page .pre-feature-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* v1.25.4 bilingual custom image file control */
.pre-image-upload-title{display:block;font-weight:600;margin-bottom:12px}
.pre-file-input{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;clip-path:inset(50%)!important}
.pre-file-ui{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}
.pre-file-button{appearance:none;border:1px solid #0f8090;background:#0f8090;color:#fff;border-radius:8px;padding:10px 16px;font:inherit;font-weight:700;cursor:pointer}
.pre-file-button:hover,.pre-file-button:focus{background:#0b6976;border-color:#0b6976}
.pre-file-status{color:#667788;min-width:0;overflow-wrap:anywhere}
.pre-portal[dir="rtl"] .pre-file-ui{direction:rtl}
.pre-portal[dir="ltr"] .pre-file-ui{direction:ltr}

/* v1.25.7 1200-character ad/property description */
.pre-char-counter{margin-top:6px;font-size:12px;color:#64748b;font-weight:600}
.pre-portal[dir="rtl"] .pre-char-counter{text-align:right}
.pre-portal[dir="ltr"] .pre-char-counter{text-align:left}
#pre-ad-description{min-height:130px;resize:vertical}
