body #adforest-ad-post-form .bornado-contact-methods-col {
    margin-bottom: 20px;
}

body #adforest-ad-post-form .bornado-contact-methods {
    background: #fff;
    border: 1px solid #eceff1;
    border-radius: 18px;
    overflow: visible;
    padding: 20px;
}

body #adforest-ad-post-form .bornado-contact-methods__header {
    margin-bottom: 16px;
}

body #adforest-ad-post-form .bornado-contact-methods__header h3 {
    color: #101828;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

body #adforest-ad-post-form .bornado-contact-methods__header p {
    color: #667085;
    line-height: 1.8;
    margin: 0;
}

body #adforest-ad-post-form .bornado-contact-methods__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
}

body #adforest-ad-post-form .bornado-contact-method-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    cursor: default;
    display: flex;
    min-height: 112px;
    overflow: visible;
    padding: 16px;
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    z-index: 1;
}

body #adforest-ad-post-form .bornado-contact-method-card:hover {
    border-color: #d0d5dd;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
    transform: translateY(-1px);
}

body #adforest-ad-post-form .bornado-contact-method-card.is-disabled {
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.9;
}

body #adforest-ad-post-form .bornado-contact-method-card.is-help-open {
    z-index: 60;
}

body #adforest-ad-post-form .bornado-contact-method-card input[type="checkbox"] {
    height: 20px;
    right: 14px;
    margin: 0;
    position: absolute;
    top: 14px;
    width: 20px;
    z-index: 2;
}

body #adforest-ad-post-form .bornado-contact-method-card__content {
    cursor: pointer;
    display: flex;
    flex: 1;
    gap: 12px;
    min-width: 0;
}

body #adforest-ad-post-form .bornado-contact-method-card__icon {
    align-items: center;
    background: #f3f4f6;
    border-radius: 14px;
    color: #111827;
    display: inline-flex;
    flex: 0 0 46px;
    font-size: 1.1rem;
    height: 46px;
    justify-content: center;
    margin-top: 10px;
    width: 46px;
}

body #adforest-ad-post-form .bornado-contact-method-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding-inline-end: 36px;
    padding-top: 8px;
}

body.rtl #adforest-ad-post-form .bornado-contact-method-card__text {
    padding-inline-end: 0;
    padding-inline-start: 0;
}

body #adforest-ad-post-form .bornado-contact-method-card__label {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 700;
}

body #adforest-ad-post-form .bornado-contact-method-card__value {
    color: #667085;
    direction: ltr;
    font-size: 0.86rem;
    text-align: left;
    unicode-bidi: plaintext;
}

body.rtl #adforest-ad-post-form .bornado-contact-method-card__value {
    text-align: right;
}

body #adforest-ad-post-form .bornado-contact-method-card__status {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-top: auto;
}

body #adforest-ad-post-form .bornado-contact-method-card__badge {
    background: #eef2ff;
    border-radius: 999px;
    color: #4338ca;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 10px;
}

body #adforest-ad-post-form .bornado-contact-method-card__badge.is-disabled {
    background: #fff1f2;
    color: #be123c;
}

body #adforest-ad-post-form .bornado-contact-method-help {
    left: 12px;
    position: absolute;
    top: 10px;
    z-index: 70;
}

body #adforest-ad-post-form .bornado-contact-method-help__trigger {
    align-items: center;
    background: #f59e0b;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    width: 30px;
}

body #adforest-ad-post-form .bornado-contact-method-help__trigger:hover,
body #adforest-ad-post-form .bornado-contact-method-help.is-open .bornado-contact-method-help__trigger {
    background: #d97706;
    box-shadow: 0 14px 24px rgba(217, 119, 6, 0.3);
    transform: scale(1.04);
}

body #adforest-ad-post-form .bornado-contact-method-help__trigger:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

body #adforest-ad-post-form .bornado-contact-method-tooltip {
    background: #111827;
    border-radius: 12px;
    bottom: calc(100% + 10px);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.2);
    color: #fff;
    left: 0;
    max-width: min(280px, calc(100vw - 48px));
    opacity: 0;
    padding: 12px 14px;
    pointer-events: none;
    position: absolute;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    visibility: hidden;
    width: max-content;
    white-space: normal;
    word-break: break-word;
    z-index: 25;
}

body #adforest-ad-post-form .bornado-contact-method-tooltip a {
    color: #fcd34d;
    text-decoration: underline;
}

body #adforest-ad-post-form .bornado-contact-method-help.is-open .bornado-contact-method-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

body #adforest-ad-post-form .bornado-contact-methods__managed-field {
    display: none !important;
}

/* Keep the ad-post experience inside the mobile viewport.
   The parent form mixes Bootstrap rows, custom grids, tags input, and the
   modern stepper/nav shell; on narrow screens one oversized child can push the
   whole page wider than the viewport and mobile browsers then pan sideways when
   an input receives focus. Clamp widths here in the child theme layer only. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

html.bornado-ios-ad-post,
html.bornado-ios-ad-post body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html.bornado-ios-ad-post::-webkit-scrollbar,
html.bornado-ios-ad-post body::-webkit-scrollbar,
html.bornado-ios-ad-post body .adforest-add-new-page::-webkit-scrollbar,
html.bornado-ios-ad-post body .adforest-add-new-page *::-webkit-scrollbar {
    display: none;
    height: 0 !important;
    width: 0 !important;
}

html.bornado-ios-ad-post body .adforest-add-new-page,
html.bornado-ios-ad-post body .adforest-add-new-page > .container,
html.bornado-ios-ad-post body .adforest-add-new-page > .container.adt-container,
html.bornado-ios-ad-post body .adforest-add-card,
html.bornado-ios-ad-post body #adforest-ad-post-form,
html.bornado-ios-ad-post body #adforest-ad-post-form .ad-post-tabs-wrapper,
html.bornado-ios-ad-post body #adforest-ad-post-form .tab-content,
html.bornado-ios-ad-post body #adforest-ad-post-form .tab-content > .tab-pane,
html.bornado-ios-ad-post body #adforest-ad-post-form .ad-post-tab-content,
html.bornado-ios-ad-post body #adforest-ad-post-form .ad-post-tab-box {
    left: 0;
    max-width: 100%;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
    width: min(100%, var(--bornado-ios-vw, 100%));
}

html.bornado-ios-ad-post body #adforest-ad-post-form .form-control,
html.bornado-ios-ad-post body #adforest-ad-post-form input,
html.bornado-ios-ad-post body #adforest-ad-post-form select,
html.bornado-ios-ad-post body #adforest-ad-post-form textarea,
html.bornado-ios-ad-post body #adforest-ad-post-form .select2,
html.bornado-ios-ad-post body #adforest-ad-post-form .select2-container,
html.bornado-ios-ad-post body #adforest-ad-post-form .select2-selection--single,
html.bornado-ios-ad-post body #adforest-ad-post-form .tagsinput,
html.bornado-ios-ad-post body #adforest-ad-post-form .bootstrap-tagsinput {
    max-width: 100%;
}

body #adforest-ad-post-form,
body #adforest-ad-post-form .tab-content,
body #adforest-ad-post-form .tab-content > .tab-pane,
body #adforest-ad-post-form .tab-pane,
body #adforest-ad-post-form .ad-post-tabs-wrapper,
body #adforest-ad-post-form .ad-post-tab-content,
body #adforest-ad-post-form .ad-post-tab-box,
body #adforest-ad-post-form .row,
body #adforest-ad-post-form [class*="col-"] {
    max-width: 100%;
    min-width: 0;
}

body .adforest-add-new-page,
body .adforest-add-new-page .container,
body .adforest-add-new-page .adt-container,
body .adforest-add-new-page .adforest-add-card,
body .adforest-add-new-page .adforest-stepper,
body #adforest-ad-post-form .tab-content,
body #adforest-ad-post-form .tab-content > .tab-pane,
body #adforest-ad-post-form .ad-post-tab-content,
body #adforest-ad-post-form .ad-post-tab-box {
    overflow-x: clip;
}

body #adforest-ad-post-form .form-control,
body #adforest-ad-post-form input,
body #adforest-ad-post-form select,
body #adforest-ad-post-form textarea,
body #adforest-ad-post-form .select2,
body #adforest-ad-post-form .select2-container,
body #adforest-ad-post-form .chosen-container,
body #adforest-ad-post-form .ad_post_image_container,
body #adforest-ad-post-form #dropzone_video {
    max-width: 100%;
    min-width: 0;
}

body #adforest-ad-post-form .select2,
body #adforest-ad-post-form .select2-container,
body #adforest-ad-post-form .chosen-container {
    width: 100% !important;
}

body #adforest-ad-post-form #custom_field_container,
body #adforest-ad-post-form #cat_template_html,
body #adforest-ad-post-form #ad_condition_and_warranty_box,
body #adforest-ad-post-form #tags_and_video_link_box,
body #adforest-ad-post-form #child-category-container,
body #adforest-ad-post-form #child-country-container {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

body #adforest-ad-post-form .tagsinput,
body #adforest-ad-post-form .bootstrap-tagsinput {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

body #adforest-ad-post-form .tagsinput input,
body #adforest-ad-post-form .bootstrap-tagsinput input {
    flex: 1 1 120px;
    max-width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 767px) {
    body .adforest-add-new-page,
    body .adforest-add-new-page .container,
    body .adforest-add-new-page .adt-container,
    body .adforest-add-new-page .adforest-add-card,
    body #adforest-ad-post-form,
    body #adforest-ad-post-form .ad-post-tabs-wrapper,
    body #adforest-ad-post-form .tab-content,
    body #adforest-ad-post-form .tab-content > .tab-pane,
    body #adforest-ad-post-form .ad-post-tab-content,
    body #adforest-ad-post-form .ad-post-tab-box {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body .adforest-add-new-page > .container,
    body .adforest-add-new-page > .container.adt-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    body .adforest-add-new-page .adforest-account-nav {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
    }

    body .adforest-add-new-page .adforest-account-nav a {
        justify-content: center;
        line-height: 1.35;
        min-width: 0;
        text-align: center;
        white-space: normal;
    }

    body .adforest-add-new-page .adforest-stepper__track {
        display: grid !important;
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
    }

    body .adforest-add-new-page .adforest-stepper__item {
        min-width: 0;
        width: 100%;
    }

    body .adforest-add-new-page .adforest-stepper__label strong {
        white-space: normal;
    }

    body #adforest-ad-post-form .row {
        margin-left: 0;
        margin-right: 0;
    }

    body #adforest-ad-post-form [class*="col-"] {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    body #adforest-ad-post-form .form-control,
    body #adforest-ad-post-form input[type="text"],
    body #adforest-ad-post-form input[type="number"],
    body #adforest-ad-post-form input[type="email"],
    body #adforest-ad-post-form input[type="url"],
    body #adforest-ad-post-form input[type="tel"],
    body #adforest-ad-post-form select,
    body #adforest-ad-post-form textarea,
    body #adforest-ad-post-form .select2-container .select2-selection--single,
    body #adforest-ad-post-form .select2-container .select2-selection__rendered,
    body #adforest-ad-post-form .select2-search__field,
    body #adforest-ad-post-form .tagsinput input,
    body #adforest-ad-post-form .bootstrap-tagsinput input {
        font-size: 16px !important;
    }

    body #adforest-ad-post-form #custom_field_container,
    body #adforest-ad-post-form #cat_template_html,
    body #adforest-ad-post-form #ad_condition_and_warranty_box,
    body #adforest-ad-post-form #tags_and_video_link_box {
        display: grid;
        gap: 14px;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body #adforest-ad-post-form .bornado-contact-methods {
        border-radius: 14px;
        padding: 16px;
    }

    body #adforest-ad-post-form .bornado-contact-methods__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body #adforest-ad-post-form .bornado-contact-method-card {
        min-height: 102px;
        padding: 14px;
    }

    body #adforest-ad-post-form .bornado-contact-method-tooltip {
        left: 0;
        max-width: calc(100vw - 48px);
        width: min(280px, calc(100vw - 48px));
    }
}

@supports (-webkit-touch-callout: none) {
    @media (max-width: 767px) {
        body #adforest-ad-post-form .tab-content > .tab-pane,
        body #adforest-ad-post-form .ad-post-tab-content,
        body #adforest-ad-post-form .ad-post-tab-box,
        body #adforest-ad-post-form .field-box,
        body #adforest-ad-post-form .form-group,
        body #adforest-ad-post-form .input-container {
            -webkit-transform: translateZ(0);
            backface-visibility: hidden;
            overscroll-behavior-x: none;
            touch-action: pan-y pinch-zoom;
        }
    }
}
