/* X.2 — Inserimento annuncio (solo presentazione). Motore invariato. */
body.mb-create-ad {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.mb-create-ad > .mb-public-main,
body.mb-create-ad > .mb-create-ad-main {
    flex: 1 0 auto;
}
body.mb-create-ad > .footer {
    flex-shrink: 0;
}

body.mb-create-ad .mb-create-ad-wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 8px 16px 40px;
    box-sizing: border-box;
}

body.mb-create-ad .mb-create-ad-hero {
    margin: 0 0 20px;
}
body.mb-create-ad .mb-create-ad-hero h1 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    color: #1c2331;
}
body.mb-create-ad .mb-create-ad-hero p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #6b7280;
}

body.mb-create-ad .mb-create-ad-tip {
    margin: 0 0 18px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 10px;
}
body.mb-create-ad .mb-create-ad-tip strong {
    color: #1c2331;
}

body.mb-create-ad .mb-create-ad-section {
    margin: 0 0 16px;
    padding: 20px 18px 18px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid #eef1f4;
}
body.mb-create-ad .mb-create-ad-section-num {
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff4ec;
    color: #ff7518;
    font-size: 13px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
}
body.mb-create-ad .mb-create-ad-section-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #1c2331;
}
body.mb-create-ad .mb-create-ad-section-note {
    margin: -6px 0 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
}

/* Stack legacy Bootstrap rows into full-width mobile-first fields */
body.mb-create-ad .mb-create-ad-section .form-group,
body.mb-create-ad .mb-create-ad-section .col-sm-12,
body.mb-create-ad .mb-create-ad-section .col-sm-5,
body.mb-create-ad .mb-create-ad-section .col-sm-6,
body.mb-create-ad .mb-create-ad-section .col-sm-7,
body.mb-create-ad .mb-create-ad-section .col-sm-3,
body.mb-create-ad .mb-create-ad-section .col-md-6,
body.mb-create-ad .mb-create-ad-section .col-md-9 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.mb-create-ad .mb-create-ad-section .form-group {
    margin: 0 0 16px;
}
body.mb-create-ad .mb-create-ad-section .form-group:last-child {
    margin-bottom: 0;
}
body.mb-create-ad .mb-create-ad-section br {
    display: none;
}

body.mb-create-ad .mb-create-ad-section label,
body.mb-create-ad .mb-create-ad-section .label {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #1c2331 !important;
    background: transparent !important;
    text-align: left !important;
    white-space: normal !important;
}

body.mb-create-ad .mb-create-ad-section .form-control,
body.mb-create-ad .mb-create-ad-section input.form-control,
body.mb-create-ad .mb-create-ad-section select.form-control,
body.mb-create-ad .mb-create-ad-section select,
body.mb-create-ad .mb-create-ad-section textarea,
body.mb-create-ad .mb-create-ad-section #body {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-height: 46px;
    height: auto;
    margin: 0 0 4px !important;
    padding: 10px 14px !important;
    font-size: 16px !important;
    line-height: 1.35;
    color: #1c2331;
    background: #fff;
    border: 1px solid #d7dde5 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
body.mb-create-ad .mb-create-ad-section textarea,
body.mb-create-ad .mb-create-ad-section #body {
    min-height: 140px;
    resize: vertical;
}
body.mb-create-ad .mb-create-ad-section .form-control:focus,
body.mb-create-ad .mb-create-ad-section select:focus,
body.mb-create-ad .mb-create-ad-section textarea:focus,
body.mb-create-ad .mb-create-ad-section #body:focus {
    border-color: #ff7518 !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 117, 24, 0.18) !important;
}
body.mb-create-ad .mb-create-ad-section select.form-control,
body.mb-create-ad .mb-create-ad-section select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px !important;
}

body.mb-create-ad .mb-create-ad-section .error,
body.mb-create-ad .mb-create-ad-section span[style*="color: red"],
body.mb-create-ad .mb-create-ad-section span[style*="color:red"] {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #c01769 !important;
}

/* Tipo annuncio / Privato-Azienda */
body.mb-create-ad .mb-create-ad-section .radio-list,
body.mb-create-ad .mb-create-ad-section #type-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.mb-create-ad .mb-create-ad-section .radio-inline,
body.mb-create-ad .mb-create-ad-section label.radio-inline,
body.mb-create-ad #li_body label[for="private_ad"],
body.mb-create-ad #li_body label[for="company_ad"] {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 10px 14px !important;
    min-height: 44px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #fff;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1c2331 !important;
    cursor: pointer;
}
body.mb-create-ad .mb-create-ad-section .radio-inline input,
body.mb-create-ad #li_body label[for="private_ad"] input,
body.mb-create-ad #li_body label[for="company_ad"] input {
    margin: 0;
    width: 18px;
    height: 18px;
}

body.mb-create-ad .mb-create-ad-tipo-utente {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Contatto telefono checkbox */
body.mb-create-ad #li_phone #phone_hidden {
    width: 18px;
    height: 18px;
    margin: 10px 8px 0 0;
    vertical-align: middle;
}
body.mb-create-ad #li_phone span[for="phone_hidden"],
body.mb-create-ad #li_phone .col-sm-24 {
    display: inline !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
}

/* Privacy */
body.mb-create-ad .mb-create-ad-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 10px;
}
body.mb-create-ad .mb-create-ad-privacy input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
body.mb-create-ad .mb-create-ad-privacy label {
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    color: #4b5563 !important;
}
body.mb-create-ad .mb-create-ad-privacy a {
    color: #ff7518;
    font-weight: 600;
}

body.mb-create-ad .mb-create-ad-cta {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #ff7518 !important;
    background-image: none !important;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    line-height: 52px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(255, 117, 24, 0.28);
    cursor: pointer;
}
body.mb-create-ad .mb-create-ad-cta:hover,
body.mb-create-ad .mb-create-ad-cta:focus {
    background: #e86610 !important;
    color: #fff !important;
}

/* Foto / orakuploader — stessa logica, UI allineata a X.2 */
body.mb-create-ad .mb-create-ad-photos {
    min-height: 140px;
    width: 100%;
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-photos #images12exDDArea {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-photos #images12ex {
    display: contents;
}
body.mb-create-ad .mb-create-ad-photos .clear {
    display: none;
}
body.mb-create-ad .mb-create-ad-photos .multibox {
    float: none !important;
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0;
    padding: 6px;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
}
body.mb-create-ad .mb-create-ad-photos .multibox.main {
    border-color: #ff7518 !important;
    box-shadow: 0 0 0 2px rgba(255, 117, 24, 0.2);
}
body.mb-create-ad .mb-create-ad-photos .multibox .picture_uploaded {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
body.mb-create-ad .mb-create-ad-photos .picture_delete {
    left: auto !important;
    right: 4px;
    top: 4px;
    margin-top: 0 !important;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background-color: rgba(28, 35, 49, 0.72);
    background-position: center;
    background-size: 14px 14px;
}
body.mb-create-ad .mb-create-ad-photos .uploadButton {
    float: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 160px;
    max-width: 100%;
    min-height: 120px;
    height: auto;
    margin: 0;
    padding: 18px 16px;
    border: 2px dashed #d7dde5 !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #1c2331;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.35;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
body.mb-create-ad .mb-create-ad-photos .uploadButton img {
    width: 36px;
    height: 36px;
    opacity: 0.85;
}
body.mb-create-ad .mb-create-ad-photos .uploadButton:hover,
body.mb-create-ad .mb-create-ad-photos .uploadButton:focus,
body.mb-create-ad .mb-create-ad-photos .uploadButton.DragAndDropHover {
    border-color: #ff7518 !important;
    background: #fff7f0 !important;
}
body.mb-create-ad .mb-create-ad-photos .maintext {
    width: auto;
    left: 6px;
    right: 6px;
    top: auto;
    bottom: 6px;
    border-radius: 6px;
    font-size: 10px;
    letter-spacing: 0.02em;
}
@media (min-width: 480px) {
    body.mb-create-ad .mb-create-ad-photos .uploadButton {
        width: 200px;
        flex: 0 0 200px;
    }
}

/* Map hook kept for gen_point.js — visually hidden */
body.mb-create-ad .mb-create-ad-map-slot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Helpers / tips from legacy JS */
body.mb-create-ad .tip {
    margin: 6px 0 0;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 8px;
}
body.mb-create-ad .tip .arrow {
    display: none;
}

/* Preview shell chrome only — replaced by full mb-cad-preview styles below */
body.mb-create-ad .mb-create-ad-preview-wrap {
    width: 100%;
}

@media (min-width: 768px) {
    body.mb-create-ad .mb-create-ad-wrap {
        padding: 16px 20px 56px;
    }
    body.mb-create-ad .mb-create-ad-hero h1 {
        font-size: 30px;
    }
    body.mb-create-ad .mb-create-ad-section {
        padding: 24px 22px 20px;
    }
}

@media (max-width: 767px) {
    body.mb-create-ad .mb-create-ad-wrap {
        padding: 4px 12px 108px;
    }
    body.mb-create-ad .mb-create-ad-hero h1 {
        font-size: 24px;
    }
    body.mb-create-ad .mb-create-ad-section {
        padding: 16px 14px 14px;
        border-radius: 10px;
    }
}

/* —— Anteprima X.2 (stessa larghezza ricerca ~1140px) —— */
body.mb-create-ad-preview .mb-create-ad-wrap {
    max-width: 1140px;
    padding-left: 16px;
    padding-right: 16px;
}
body.mb-create-ad-preview .mb-cad-preview {
    width: 100%;
    box-sizing: border-box;
}

body.mb-create-ad-preview .mb-cad-preview-alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #1e3a5f;
    background: #eef6ff;
    border: 1px solid #d0e4ff;
    border-radius: 10px;
}
body.mb-create-ad-preview .mb-cad-preview-alert--soft {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}
body.mb-create-ad-preview .mb-cad-preview-alert--error {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

body.mb-create-ad-preview .mb-cad-preview-card {
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
body.mb-create-ad-preview .mb-cad-preview-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1f4;
}
body.mb-create-ad-preview .mb-cad-preview-card-head-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}
body.mb-create-ad-preview .mb-cad-preview-eye {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fff4ec;
    color: #ff7518;
    font-size: 18px;
}
body.mb-create-ad-preview .mb-cad-preview-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #1c2331;
}
body.mb-create-ad-preview .mb-cad-preview-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #6b7280;
}
body.mb-create-ad-preview .mb-cad-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

body.mb-create-ad-preview .mb-cad-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px 28px;
    padding: 20px;
    align-items: start;
}
body.mb-create-ad-preview .mb-cad-preview-gallery {
    min-width: 0;
}
body.mb-create-ad-preview .mb-cad-preview-stage {
    position: relative;
    background: #eef1f4;
    border-radius: 12px;
    overflow: hidden;
    min-height: 260px;
    max-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.mb-create-ad-preview .mb-cad-preview-stage a {
    display: block;
    width: 100%;
    line-height: 0;
}
body.mb-create-ad-preview .mb-cad-preview-stage img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}
body.mb-create-ad-preview .mb-cad-preview-stage--empty {
    min-height: 220px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
}
body.mb-create-ad-preview .mb-cad-preview-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(28, 35, 49, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
body.mb-create-ad-preview .mb-cad-preview-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
body.mb-create-ad-preview .mb-cad-preview-thumb {
    display: block;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f4;
    cursor: pointer;
    box-sizing: border-box;
}
body.mb-create-ad-preview .mb-cad-preview-thumb.is-active {
    border-color: #ff7518;
}
body.mb-create-ad-preview .mb-cad-preview-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.mb-create-ad-preview .mb-cad-preview-info {
    min-width: 0;
}
body.mb-create-ad-preview .mb-cad-preview-cat {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #ff7518;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body.mb-create-ad-preview .mb-cad-preview-ad-title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    color: #1c2331;
    word-wrap: break-word;
}
body.mb-create-ad-preview .mb-cad-preview-price {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #ff7518;
}
body.mb-create-ad-preview .mb-cad-preview-facts {
    list-style: none;
    margin: 0;
    padding: 0;
}
body.mb-create-ad-preview .mb-cad-preview-facts li {
    display: grid;
    grid-template-columns: 28px minmax(90px, 120px) minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
    padding: 10px 0;
    border-top: 1px solid #eef1f4;
    font-size: 14px;
    line-height: 1.4;
}
body.mb-create-ad-preview .mb-cad-preview-facts li:last-child {
    border-bottom: 1px solid #eef1f4;
}
body.mb-create-ad-preview .mb-cad-preview-fact-ico {
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.4;
}
body.mb-create-ad-preview .mb-cad-preview-fact-label {
    color: #6b7280;
    font-weight: 600;
}
body.mb-create-ad-preview .mb-cad-preview-fact-val {
    color: #1c2331;
    font-weight: 600;
    word-break: break-word;
}
body.mb-create-ad-preview .mb-cad-preview-muted {
    display: inline;
    margin-left: 4px;
    font-style: normal;
    font-weight: 500;
    color: #6b7280;
    font-size: 13px;
}

body.mb-create-ad-preview .mb-cad-preview-desc-card {
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
body.mb-create-ad-preview .mb-cad-preview-desc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #eef1f4;
    color: #1c2331;
}
body.mb-create-ad-preview .mb-cad-preview-desc-head .fa {
    color: #ff7518;
}
body.mb-create-ad-preview .mb-cad-preview-desc-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
body.mb-create-ad-preview .mb-cad-preview-desc-body {
    padding: 18px 20px 22px;
    font-size: 15px;
    line-height: 1.6;
    color: #1c2331;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.mb-create-ad-preview .mb-cad-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0 28px;
}
body.mb-create-ad-preview .mb-cad-preview-btn-edit,
body.mb-create-ad-preview .mb-cad-preview-btn-publish {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}
body.mb-create-ad-preview .mb-cad-preview-btn-edit {
    background: #eef1f4;
    color: #1c2331;
}
body.mb-create-ad-preview .mb-cad-preview-btn-edit:hover,
body.mb-create-ad-preview .mb-cad-preview-btn-edit:focus {
    background: #e2e8f0;
}
body.mb-create-ad-preview .mb-cad-preview-btn-publish {
    background: #ff7518 !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(255, 117, 24, 0.28);
}
body.mb-create-ad-preview .mb-cad-preview-btn-publish:hover,
body.mb-create-ad-preview .mb-cad-preview-btn-publish:focus {
    background: #e86610 !important;
}
body.mb-create-ad-preview .mb-cad-preview-btn-publish:disabled,
body.mb-create-ad-preview .mb-cad-preview-btn-publish.disabled {
    opacity: 0.7;
    cursor: wait;
}
body.mb-create-ad-preview .mb-cad-preview-btn-main {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
body.mb-create-ad-preview .mb-cad-preview-btn-sub {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.85;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 991px) {
    body.mb-create-ad-preview .mb-cad-preview-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    body.mb-create-ad-preview .mb-cad-preview-ad-title {
        font-size: 22px;
    }
    body.mb-create-ad-preview .mb-cad-preview-price {
        font-size: 24px;
    }
}
@media (max-width: 767px) {
    body.mb-create-ad-preview .mb-create-ad-wrap {
        padding: 8px 12px 108px;
    }
    body.mb-create-ad-preview .mb-cad-preview-card-head {
        padding: 14px 14px 12px;
    }
    body.mb-create-ad-preview .mb-cad-preview-title {
        font-size: 18px;
    }
    body.mb-create-ad-preview .mb-cad-preview-facts li {
        grid-template-columns: 24px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }
    body.mb-create-ad-preview .mb-cad-preview-fact-label {
        grid-column: 2;
    }
    body.mb-create-ad-preview .mb-cad-preview-fact-val {
        grid-column: 2;
    }
    body.mb-create-ad-preview .mb-cad-preview-actions {
        grid-template-columns: 1fr;
    }
}

/* —— Esito pubblicazione (create_ad_ok) —— */
body.mb-create-ad-ok .mb-create-ad-ok-wrap {
    max-width: 560px;
}
body.mb-create-ad-ok .mb-create-ad-ok-card {
    margin: 8px 0 24px;
    padding: 28px 22px 26px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    text-align: center;
    box-sizing: border-box;
}
body.mb-create-ad-ok .mb-create-ad-ok-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 0 14px;
    border-radius: 999px;
    font-size: 24px;
}
body.mb-create-ad-ok .mb-create-ad-ok-icon--ok {
    background: #ecfdf3;
    color: #15803d;
}
body.mb-create-ad-ok .mb-create-ad-ok-icon--mail {
    background: #fff4ec;
    color: #ff7518;
}
body.mb-create-ad-ok .mb-create-ad-ok-icon--warn {
    background: #fff7ed;
    color: #c2410c;
}
body.mb-create-ad-ok .mb-create-ad-ok-icon--neutral {
    background: #f1f5f9;
    color: #64748b;
}
body.mb-create-ad-ok .mb-create-ad-ok-badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
body.mb-create-ad-ok .mb-create-ad-ok-title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    color: #1c2331;
}
body.mb-create-ad-ok .mb-create-ad-ok-lead {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #6b7280;
}
body.mb-create-ad-ok .mb-create-ad-ok-id {
    margin: 14px 0 6px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 10px;
}
body.mb-create-ad-ok .mb-create-ad-ok-id strong {
    display: inline-block;
    margin-left: 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1c2331;
    font-variant-numeric: tabular-nums;
}
body.mb-create-ad-ok .mb-create-ad-ok-meta {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.4;
    color: #1c2331;
    font-weight: 600;
}
body.mb-create-ad-ok .mb-create-ad-ok-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    color: #9f1239;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
}
body.mb-create-ad-ok .mb-create-ad-ok-form {
    margin: 18px 0 0;
    text-align: left;
}
body.mb-create-ad-ok .mb-create-ad-ok-field {
    margin: 0 0 16px;
}
body.mb-create-ad-ok .mb-create-ad-ok-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1c2331;
}
body.mb-create-ad-ok .mb-create-ad-ok-field .form-control {
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 16px;
    color: #1c2331;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
}
body.mb-create-ad-ok .mb-create-ad-ok-field .form-control:focus {
    border-color: #ff7518;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 117, 24, 0.18);
}
body.mb-create-ad-ok .mb-create-ad-ok-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
body.mb-create-ad-ok .mb-create-ad-ok-actions .mb-create-ad-cta,
body.mb-create-ad-ok .mb-create-ad-ok-form .mb-create-ad-cta {
    text-decoration: none;
}
body.mb-create-ad-ok .mb-create-ad-ok-btn-secondary,
body.mb-create-ad-ok .mb-create-ad-ok-btn-ghost {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 48px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
body.mb-create-ad-ok .mb-create-ad-ok-btn-secondary {
    background: #fff;
    border: 1px solid #d7dde5;
    color: #1c2331;
}
body.mb-create-ad-ok .mb-create-ad-ok-btn-secondary:hover,
body.mb-create-ad-ok .mb-create-ad-ok-btn-secondary:focus {
    border-color: #ff7518;
    color: #e86610;
    text-decoration: none;
}
body.mb-create-ad-ok .mb-create-ad-ok-btn-ghost {
    background: transparent;
    border: 0;
    color: #6b7280;
    min-height: 40px;
    line-height: 40px;
    font-weight: 500;
}
body.mb-create-ad-ok .mb-create-ad-ok-btn-ghost:hover,
body.mb-create-ad-ok .mb-create-ad-ok-btn-ghost:focus {
    color: #ff7518;
    text-decoration: underline;
}
body.mb-create-ad-ok .mb-create-ad-ok-note {
    margin: 14px 0 0;
    font-size: 14px;
    text-align: center;
}
body.mb-create-ad-ok .mb-create-ad-ok-note a {
    color: #ff7518;
    font-weight: 600;
}
@media (min-width: 768px) {
    body.mb-create-ad-ok .mb-create-ad-ok-card {
        padding: 36px 32px 32px;
    }
    body.mb-create-ad-ok .mb-create-ad-ok-title {
        font-size: 30px;
    }
}

/* X.2 — Selettore categoria (pattern UI U.2G; select #category resta autoritativo). */
body.mb-create-ad .mb-create-ad-msel {
    display: block;
    position: relative;
    width: 100%;
}
body.mb-create-ad .mb-create-ad-msel select#category {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
}
body.mb-create-ad .mb-create-ad-msel .mb-home-msel-trigger {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #d7dde6;
    border-radius: 8px;
    background: #fff;
    color: #1c2331;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.mb-create-ad .mb-create-ad-msel .mb-home-msel-trigger.is-placeholder {
    color: #6b7280;
    font-weight: 500;
}
body.mb-create-ad.mb-create-ad-pick-open,
body.mb-create-ad.mb-home-pick-open {
    overflow: hidden;
}
body.mb-create-ad .mb-create-ad-pick {
    display: none;
}
body.mb-create-ad .mb-create-ad-pick.is-open {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1090;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.45);
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-panel {
    position: fixed;
    top: 10%;
    left: 16px;
    right: 16px;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    z-index: 1;
    padding: 0 0 12px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 1px 0 #eef1f4;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px 8px 12px;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1c2331;
    line-height: 1.3;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-back {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 8px 8px 4px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #1a9d32;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    color: #4b5563;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-list {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-list button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: transparent;
    color: #1c2331;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-list li:last-child button {
    border-bottom: 0;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-list button.is-selected {
    color: #1a9d32;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-empty {
    padding: 16px 8px;
    color: #6b7280;
    font-size: 14px;
}
@media (min-width: 768px) {
    body.mb-create-ad .mb-create-ad-pick .mb-home-pick-panel {
        top: 12%;
        left: 50%;
        right: auto;
        width: 420px;
        max-width: calc(100vw - 48px);
        transform: translateX(-50%);
        max-height: 70vh;
    }
}

/* Create-ad location pickers: solo mobile; desktop resta select nativa. */
body.mb-create-ad .mb-create-ad-loc-msel .mb-home-msel-trigger {
    display: none !important;
}
body.mb-create-ad .mb-create-ad-loc-msel.is-loc-hidden {
    display: block;
}
body.mb-create-ad .mb-create-ad-loc-msel select#city,
body.mb-create-ad .mb-create-ad-loc-msel select#town,
body.mb-create-ad .mb-create-ad-loc-msel select#zone {
    position: static;
    width: 100%;
    height: auto;
    min-height: 34px;
    opacity: 1;
    pointer-events: auto;
    clip: auto;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-filter {
    padding: 0 16px 10px;
}
body.mb-create-ad .mb-create-ad-pick .mb-home-pick-search {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}
@media (max-width: 767px) {
    body.mb-create-ad .mb-create-ad-loc-msel select#city,
    body.mb-create-ad .mb-create-ad-loc-msel select#town,
    body.mb-create-ad .mb-create-ad-loc-msel select#zone {
        position: absolute;
        left: 0;
        top: 0;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
        clip: rect(0, 0, 0, 0);
    }
    body.mb-create-ad .mb-create-ad-loc-msel .mb-home-msel-trigger {
        display: flex !important;
    }
    body.mb-create-ad .mb-create-ad-loc-msel.is-loc-hidden {
        display: none !important;
    }
}

/* Create-ad Lotto 2 — select dinamiche Immobili: solo mobile. */
body.mb-create-ad .mb-create-ad-dyn-msel .mb-home-msel-trigger {
    display: none !important;
}
body.mb-create-ad .mb-create-ad-dyn-msel select {
    position: static;
    width: 100%;
    height: auto;
    min-height: 34px;
    opacity: 1;
    pointer-events: auto;
    clip: auto;
}
@media (max-width: 767px) {
    body.mb-create-ad .mb-create-ad-dyn-msel select {
        position: absolute;
        left: 0;
        top: 0;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
        clip: rect(0, 0, 0, 0);
    }
    body.mb-create-ad .mb-create-ad-dyn-msel .mb-home-msel-trigger {
        display: flex !important;
    }
    body.mb-create-ad .mb-create-ad-dyn-msel.is-dyn-hidden {
        display: none !important;
    }
}
