/* ==========================================================================
   Property request modals (front-end/agent/form_request_modals.blade.php)
   "Request your Property to Buy or Rent" + "Post your Property for Sale or Rent".
   Also used by the customer-profile copies (cp_ = My Requests, p_ = Marketing Requests).
   Scoped to .req-modal; :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) gives ID-level specificity so these
   rules win over the legacy #msform / .msform rules in style.css / ar-style.css.
   The wizard JS relies on: fieldset > .next / .previous (direct children) and :is(#progressbar, #cp_progressbar, #p_progressbar) li.active.
   ========================================================================== */

.req-modal {
    --req-accent: #ff5a5f;
    --req-accent-dark: #f0464c;
    --req-accent-soft: #fff3f3;
    --req-ring: rgba(255, 90, 95, 0.16);
    --req-ink: #111827;
    --req-text: #374151;
    --req-muted: #6b7280;
    --req-line: #e5e7eb;
    --req-field: #e3e6ea;
    --req-surface: #f9fafb;
}

/* ---------- Shell: split layout ----------
   Left (right in Arabic): brand panel with title, vertical stepper and perks.
   Other side: the active step. The <form> is display: contents, so its :is(#progressbar, #cp_progressbar, #p_progressbar) and
   fieldsets become grid items of .popup-property-card; submitting and the wizard JS are unaffected. */
.req-modal {
    --req-brand: #241066;
    --req-brand-2: #3d1d99;
    --req-panel: 330px;
}
.req-modal .custom-property-modal-dialog { max-width: 1120px; }
.req-modal .modal-content {
    border: 0;
    border-radius: 26px;
    box-shadow: 0 40px 90px rgba(20, 10, 60, 0.35);
    overflow: hidden;
}
.req-modal .modal-content > .container-fluid { padding: 0; }
.req-modal .modal-content > .container-fluid > .row { margin: 0; }
.req-modal .modal-content > .container-fluid > .row > [class*="col-"] {
    position: relative;
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.req-modal .popup-property-card {
    display: grid;
    grid-template-columns: var(--req-panel) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    min-height: 660px;
    margin: 0 !important;
    padding: 0 !important;
    text-align: start;
    background:
        radial-gradient(280px 280px at 0 100%, rgba(255, 90, 95, 0.45), transparent 70%) no-repeat 0 0 / var(--req-panel) 100%,
        radial-gradient(220px 220px at 100% 0, rgba(255, 255, 255, 0.10), transparent 70%) no-repeat 0 0 / var(--req-panel) 100%,
        linear-gradient(160deg, var(--req-brand-2), var(--req-brand)) no-repeat 0 0 / var(--req-panel) 100%,
        #fff;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) { display: contents; }

/* ---------- Brand panel ---------- */
.req-modal .req-head { grid-column: 1; grid-row: 1; padding: 44px 34px 0; text-align: start; }
.req-modal :is(#heading, #cp_heading, #p_heading) {
    margin: 0 0 12px;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.01em;
    text-align: start;
}
.req-modal .req-subtitle { max-width: none; margin: 0; font-size: 14px; line-height: 1.75; color: rgba(255, 255, 255, 0.72); text-align: start; }

/* Vertical stepper */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) {
    grid-column: 1;
    grid-row: 2;
    display: block;
    max-width: none;
    margin: 40px 34px 0;
    padding: 0;
    overflow: visible;
    counter-reset: req-step;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    float: none;
    width: auto;
    height: 42px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    text-align: start;
    counter-increment: req-step;
    transition: color 0.25s;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:last-child { margin-bottom: 0; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li strong { display: block; margin: 0; font-weight: 600; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:before {
    content: counter(req-step);
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 38px;
    text-align: center;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
/* Connector from the previous circle down to this one. */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:after {
    content: '';
    position: absolute;
    top: -30px;
    left: 20px;
    right: auto;
    z-index: 0;
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.25s;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:first-child:after { content: none; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li.active { color: #fff; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li.active:before {
    border-color: var(--req-accent);
    background: var(--req-accent);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(255, 90, 95, 0.25);
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li.active:after { background: var(--req-accent); }
/* Steps already passed show a check instead of the number. */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li.active:has(+ li.active) { color: rgba(255, 255, 255, 0.85); }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li.active:has(+ li.active):before {
    content: '\2713';
    border-color: rgba(255, 90, 95, 0.6);
    background: rgba(255, 90, 95, 0.18);
    color: #ffb3b5;
    box-shadow: none;
}

/* Perks */
.req-modal .req-perks {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    display: grid;
    gap: 12px;
    margin: 36px 34px 34px;
    padding: 20px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    list-style: none;
}
.req-modal .req-perks li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.86); font-size: 13px; font-weight: 600; }
.req-modal .req-perk-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffb3b5;
    font-size: 12px;
}

/* Close button (sits on the white side) */
.req-modal .agent-property-xmark {
    top: 22px;
    right: 22px;
    left: auto;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--req-text);
    font-size: 16px;
    transition: background 0.15s, color 0.15s, transform 0.2s;
}
.req-modal .agent-property-xmark:hover { background: var(--req-accent-soft); color: var(--req-accent); transform: rotate(90deg); }

/* ---------- Step area ---------- */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset {
    grid-column: 2;
    grid-row: 1 / -1;
    margin: 0;
    padding: 44px 48px 34px;
    border-radius: 0;
    background: transparent; /* the card behind is white and rounded */
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset:after { content: ''; display: block; clear: both; }
.req-modal .form-card {
    padding: 0 0 28px;
    border: 0;
    border-bottom: 1px solid var(--req-line);
    border-radius: 0;
    background: none;
    text-align: start;
}
/* "01 / 03" eyebrow: hidden fieldsets don't count, so number them by position. */
.req-modal .form-card:before {
    display: block;
    margin-bottom: 8px;
    color: var(--req-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset:nth-of-type(1) .form-card:before { content: '01 / 03'; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset:nth-of-type(2) .form-card:before { content: '02 / 03'; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset:nth-of-type(3) .form-card:before { content: '03 / 03'; }
.req-modal .fs-title {
    margin: 0 0 4px;
    padding-inline-end: 52px; /* room for the close button */
    font-size: 23px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--req-ink);
    text-align: start;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset:nth-of-type(3) .fs-title { font-size: 18px; font-weight: 700; }
.req-modal .fieldlabels {
    display: block;
    margin: 18px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--req-text);
    text-align: start;
}

/* ---------- Fields ---------- */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(input:not([type="radio"]):not([type="checkbox"]):not([type="button"]):not([type="hidden"]), textarea, select.form-control) {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--req-field);
    border-radius: 12px;
    background-color: #fff;
    color: var(--req-ink);
    font-size: 14px;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) textarea { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(input, textarea, select):focus {
    border-color: var(--req-accent);
    box-shadow: 0 0 0 4px var(--req-ring) !important;
    outline: 0;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(input, textarea)::placeholder { color: #9ca3af; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) input.ui-disabled { background-color: #f3f4f6 !important; border-color: var(--req-field) !important; }
.req-modal .error-message { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: #dc2626; }
.req-modal :is(input, select, textarea).error { border-color: #f87171 !important; }

/* ---------- Pickers: City (Select2) + District / Agents (bootstrap-select) ----------
   Same look for both libraries: 52px field, optional icon tile (.req-select > .req-select-icon),
   bold value, drawn chevron that flips when open, round clear button. Logical properties
   (inset-inline-*, padding-inline-*) mirror everything automatically on Arabic pages. */
.req-modal .req-select { position: relative; }
.req-modal .req-select-icon {
    position: absolute;
    top: 26px; /* half the field height; stays put when a validation message appears below */
    inset-inline-start: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--req-accent-soft);
    color: var(--req-accent);
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Field box (both libraries) */
.req-modal .select2-container--default .select2-selection--single,
.req-modal .bootstrap-select > .dropdown-toggle {
    position: relative;
    display: block;
    height: 52px;
    margin: 0;
    padding: 0;
    padding-inline-start: 16px;
    padding-inline-end: 48px;
    border: 1px solid var(--req-field) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04) !important;
    outline: 0 !important;
    text-align: start;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.req-modal .req-select .select2-container--default .select2-selection--single,
.req-modal .req-select .bootstrap-select > .dropdown-toggle { padding-inline-start: 56px; }
.req-modal .select2-container--default .select2-selection--single.select2-selection--clearable { padding-inline-end: 80px; }
.req-modal .select2-container--default .select2-selection--single:hover,
.req-modal .bootstrap-select > .dropdown-toggle:hover { border-color: #cfd4da !important; }
.req-modal .select2-container--default.select2-container--focus .select2-selection--single,
.req-modal .select2-container--default.select2-container--open .select2-selection--single,
.req-modal .bootstrap-select.show > .dropdown-toggle,
.req-modal .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--req-accent) !important;
    box-shadow: 0 0 0 4px var(--req-ring) !important;
}

/* Value / placeholder text */
.req-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.req-modal .bootstrap-select .filter-option-inner-inner {
    position: static;
    display: block;
    padding: 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 50px;
    color: var(--req-ink);
    text-align: start;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.req-modal .bootstrap-select .filter-option { position: static; float: none; width: 100%; height: 100%; padding: 0; text-align: start; }
.req-modal .bootstrap-select .filter-option-inner { padding: 0 !important; }
.req-modal .select2-container--default .select2-selection--single .select2-selection__placeholder,
.req-modal .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option-inner-inner { font-weight: 500; color: #9ca3af; }

/* Chevron (both libraries) */
.req-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 50%;
    inset-inline-end: 16px;
    inset-inline-start: auto;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
}
.req-modal .select2-container--default .select2-selection--single .select2-selection__arrow b,
.req-modal .bootstrap-select .bs-caret { display: none; }
.req-modal .select2-container--default .select2-selection--single .select2-selection__arrow:after,
.req-modal .bootstrap-select > .dropdown-toggle:after {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-end: 22px;
    inset-inline-start: auto;
    width: 8px;
    height: 8px;
    margin: -6px 0 0;
    border: 0;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    vertical-align: 0;
    transform: rotate(45deg);
    transition: transform 0.2s, margin 0.2s, border-color 0.2s;
}
.req-modal .select2-container--default .select2-selection--single .select2-selection__arrow:after { inset-inline-end: 6px; }
.req-modal .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:after,
.req-modal .bootstrap-select.show > .dropdown-toggle:after {
    margin-top: -2px;
    border-color: var(--req-accent);
    transform: rotate(-135deg);
}

/* Clear button (Select2 puts it straight inside .select2-selection) */
.req-modal .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 50%;
    inset-inline-end: 44px;
    inset-inline-start: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f2f4;
    color: var(--req-muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.req-modal .select2-container--default .select2-selection--single .select2-selection__clear:hover { background: var(--req-accent-soft); color: var(--req-accent); }
.req-modal .select2-container--default .select2-selection--single .select2-selection__clear span { line-height: 1; }

/* Dropdown panels */
.req-modal .select2-dropdown,
.req-modal .bootstrap-select .dropdown-menu {
    padding: 6px;
    border: 1px solid var(--req-field) !important;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
    overflow: hidden;
}
.req-modal .select2-dropdown--below { margin-top: 6px; }
.req-modal .select2-dropdown--above { margin-top: -6px; }
.req-modal .bootstrap-select .dropdown-menu { margin-top: 6px; }
.req-modal .bootstrap-select .dropdown-menu.inner { padding: 0; border: 0 !important; box-shadow: none; }

/* Search box inside the panels */
.req-modal .select2-search--dropdown { padding: 2px 2px 8px; }
.req-modal .select2-search--dropdown .select2-search__field,
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    padding-inline-start: 36px;
    border: 1px solid var(--req-field);
    border-radius: 10px;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
    font-size: 14px;
    outline: 0;
}
.req-modal .select2-search--dropdown .select2-search__field:focus,
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input:focus { border-color: var(--req-accent); background-color: #fff; box-shadow: 0 0 0 3px var(--req-ring) !important; }
.req-modal .bootstrap-select .bs-searchbox { padding: 2px 2px 8px; }

/* Options */
.req-modal .select2-results__options { max-height: 240px; }
.req-modal .select2-results__option,
.req-modal .bootstrap-select .dropdown-menu li a {
    position: relative;
    margin: 1px 0;
    padding: 10px 12px;
    padding-inline-end: 34px;
    border-radius: 9px;
    color: var(--req-text);
    font-size: 14px;
    text-align: start;
}
.req-modal .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.req-modal .select2-container--default .select2-results__option--highlighted[aria-selected],
.req-modal .bootstrap-select .dropdown-menu li a:hover,
.req-modal .bootstrap-select .dropdown-menu li a.active,
.req-modal .bootstrap-select .dropdown-menu li a:active { background: #f6f7f9; color: var(--req-ink); }
.req-modal .select2-container--default .select2-results__option--selected,
.req-modal .select2-container--default .select2-results__option[aria-selected="true"],
.req-modal .bootstrap-select .dropdown-menu li.selected a { background: var(--req-accent-soft); color: var(--req-accent); font-weight: 700; }
.req-modal .select2-container--default .select2-results__option--selected:after,
.req-modal .select2-container--default .select2-results__option[aria-selected="true"]:after,
.req-modal .bootstrap-select .dropdown-menu li.selected a:after {
    content: '\2713';
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    font-weight: 700;
    transform: translateY(-50%);
}
.req-modal .bootstrap-select .dropdown-menu li.selected a .check-mark { display: none; }
.req-modal .select2-results__message,
.req-modal .bootstrap-select .no-results { padding: 12px; margin: 0; background: transparent; color: var(--req-muted); font-size: 13px; text-align: center; }

/* bootstrap-select adds an inline-block .dropdown-toggle:before that pushes a static label onto a
   second line; pin the label over the whole button instead and centre it. */
.req-modal .bootstrap-select > .dropdown-toggle:before { display: none; }
.req-modal .bootstrap-select > .dropdown-toggle .filter-option {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    padding-inline-start: 16px;
    padding-inline-end: 48px;
}
.req-modal .req-select .bootstrap-select > .dropdown-toggle .filter-option { padding-inline-start: 56px; }
.req-modal .bootstrap-select > .dropdown-toggle .filter-option-inner { width: 100%; min-width: 0; }
.req-modal .bootstrap-select > .dropdown-toggle .filter-option-inner-inner { line-height: 1.4; }

/* Map */
.req-modal .req-map {
    height: 300px;
    overflow: hidden;
    border: 1px solid var(--req-field);
    border-radius: 14px;
    background: #eef1f4;
}
.req-modal .req-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Radio groups as pills (price type, contact method) */
.req-modal .req-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.req-modal .req-pills .form-check { margin: 0; padding: 0; }
.req-modal .req-pills .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
.req-modal .req-pills .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--req-field);
    border-radius: 999px;
    background: #fff;
    color: var(--req-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.req-modal .req-pills .form-check-label:before {
    content: '';
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid #cbd0d6;
    border-radius: 50%;
    background: #fff;
    transition: border 0.15s;
}
.req-modal .req-pills .form-check-label:hover { border-color: #f4b4b6; }
.req-modal .req-pills .form-check-input:checked + .form-check-label { border-color: var(--req-accent); background: var(--req-accent-soft); color: var(--req-accent); }
.req-modal .req-pills .form-check-input:checked + .form-check-label:before { border: 5px solid var(--req-accent); }
.req-modal .req-pills .form-check-input:focus-visible + .form-check-label { box-shadow: 0 0 0 4px var(--req-ring); }

/* "Method" choice buttons (step 3) */
.req-modal .req-method { gap: 10px; }
.req-modal .req-method .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    margin: 0 !important;
    border: 1px solid var(--req-field);
    border-radius: 12px !important;
    background: #fff;
    color: var(--req-text);
    font-weight: 700;
    box-shadow: none;
}
.req-modal .req-method .btn.bg-danger { border-color: var(--req-accent); background: var(--req-accent) !important; color: #fff; }

/* Photo dropzone (post property) */
.req-modal .dropzone {
    padding: 28px 16px;
    border: 2px dashed #f3b2b4;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    color: var(--req-muted);
}
.req-modal .dropzone .btn { margin-top: 6px; padding: 10px 22px; border: 0; border-radius: 10px; background: var(--req-accent); font-weight: 700; }

/* ---------- Footer buttons ---------- */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(.action-button, .action-button-previous) {
    float: right;
    width: auto;
    min-width: 132px;
    height: 48px;
    margin: 20px 0 6px;
    padding: 0 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 46px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button {
    border: 1px solid var(--req-accent);
    background: var(--req-accent);
    color: #fff;
    box-shadow: 0 10px 22px rgba(255, 90, 95, 0.28);
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button:hover,
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button:focus { background: var(--req-accent-dark); border-color: var(--req-accent-dark); color: #fff; transform: translateY(-1px); }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button-previous {
    float: left;
    border: 1px solid var(--req-field);
    background: #fff;
    color: var(--req-text);
    box-shadow: none;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button-previous:hover,
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button-previous:focus { background: #f3f4f6; color: var(--req-ink); }

/* ---------- Arabic (RTL) ---------- */
html[lang="ar"] .req-modal .modal-content { direction: rtl; }
html[lang="ar"] .req-modal .popup-property-card {
    background:
        radial-gradient(280px 280px at 100% 100%, rgba(255, 90, 95, 0.45), transparent 70%) no-repeat 100% 0 / var(--req-panel) 100%,
        radial-gradient(220px 220px at 0 0, rgba(255, 255, 255, 0.10), transparent 70%) no-repeat 100% 0 / var(--req-panel) 100%,
        linear-gradient(200deg, var(--req-brand-2), var(--req-brand)) no-repeat 100% 0 / var(--req-panel) 100%,
        #fff;
}
html[lang="ar"] .req-modal .agent-property-xmark { right: auto; left: 22px; }
html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:after { left: auto; right: 20px; }
html[lang="ar"] .req-modal :is(.req-head, :is(#heading, #cp_heading, #p_heading), .req-subtitle, .form-card, .fs-title, .fieldlabels) { text-align: right; }
html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button { float: left; }
html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .action-button-previous { float: right; }
/* Select2 stamps dir="ltr" when no ancestor has a dir attribute; follow the page instead so the
   logical properties above mirror the pickers. */
html[lang="ar"] .req-modal .select2-container, html[lang="ar"] .req-modal .bootstrap-select { direction: rtl; }

/* ---------- Tablet & phone: stacked, horizontal stepper on a brand header ---------- */
@media (max-width: 991.98px) {
    .req-modal .modal-content { border-radius: 20px; }
    .req-modal .popup-property-card,
    html[lang="ar"] .req-modal .popup-property-card { display: block; min-height: 0; background: #fff; }
    .req-modal .req-head {
        padding: 30px 64px 4px 24px;
        background: var(--req-brand);
    }
    html[lang="ar"] .req-modal .req-head { padding: 30px 24px 4px 64px; }
    .req-modal :is(#heading, #cp_heading, #p_heading) { font-size: 22px; }
    .req-modal .req-subtitle { font-size: 13px; }

    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) {
        display: flex;
        margin: 0;
        padding: 20px 12px 22px;
        background: var(--req-brand);
    }
    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li {
        flex: 1 1 0;
        flex-direction: column;
        gap: 8px;
        height: auto;
        margin: 0;
        font-size: 12px;
        text-align: center;
    }
    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:before { flex-basis: auto; width: 36px; height: 36px; line-height: 32px; font-size: 13px; }
    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:after,
    html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:after { top: 17px; left: -50%; right: auto; width: 100%; height: 2px; }
    html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(#progressbar, #cp_progressbar, #p_progressbar) li:after { left: auto; right: -50%; }

    .req-modal .req-perks { display: none; }
    .req-modal .agent-property-xmark { top: 18px; right: 16px; background: rgba(255, 255, 255, 0.14); color: #fff; }
    html[lang="ar"] .req-modal .agent-property-xmark { right: auto; left: 16px; }
    .req-modal .agent-property-xmark:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) fieldset { padding: 26px 20px 22px; }
    .req-modal .fs-title { padding-inline-end: 0; font-size: 19px; }
    .req-modal .req-map { height: 240px; }
}
@media (max-width: 575.98px) {
    .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) :is(.action-button, .action-button-previous) { min-width: 0; width: calc(50% - 6px); padding: 0 12px; }
}

/* Keep the "01 / 03" eyebrow in reading order on Arabic pages. */
html[lang="ar"] .req-modal .form-card:before { direction: ltr; text-align: right; }

/* ---------- District / agents dropdown (bootstrap-select) panel ----------
   Same width as the field, capped list height, no placeholder row; the modal no longer clips it. */
.req-modal .modal-content { overflow: visible; }
.req-modal .popup-property-card { border-radius: 26px; }
.req-modal .bootstrap-select > .dropdown-menu {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100%;
    max-height: none !important;
    box-sizing: border-box;
}
.req-modal .bootstrap-select .dropdown-menu.inner {
    max-height: 264px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}
.req-modal .bootstrap-select .dropdown-menu.inner::-webkit-scrollbar { width: 6px; }
.req-modal .bootstrap-select .dropdown-menu.inner::-webkit-scrollbar-thumb { border-radius: 6px; background: #d9dde3; }
.req-modal .bootstrap-select .dropdown-menu li.disabled { display: none; }
.req-modal .bootstrap-select .dropdown-menu li a { white-space: normal; }
.req-modal .bootstrap-select .bs-searchbox { padding: 2px 2px 8px; }
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input:focus { box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.10) !important; }
.req-modal .select2-search--dropdown .select2-search__field:focus { box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.10) !important; }

@media (max-width: 991.98px) {
    .req-modal .popup-property-card { border-radius: 20px; }
    .req-modal .req-head { border-radius: 20px 20px 0 0; }
}

/* District / agents search box: the generic field rule above (input:not()...:not() inside the form)
   outranks the shared search-box rule, so restate the search-box metrics here to match City's. */
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input.form-control {
    height: 40px !important;
    padding: 0 12px !important;
    padding-inline-start: 36px !important;
    border: 1px solid var(--req-field) !important;
    border-radius: 10px !important;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center !important;
    font-size: 14px;
}
.req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input.form-control:focus {
    border-color: var(--req-accent) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.10) !important;
}
html[lang="ar"] .req-modal :is(#buyRentForm, #msform, #cp_buyRentForm, #p_msform) .bootstrap-select .bs-searchbox input.form-control,
html[lang="ar"] .req-modal .select2-search--dropdown .select2-search__field { background-position: right 12px center !important; }

/* ---------- Uploaded photos carousel (#imageCarousel, Owl) ---------- */
.req-modal :is(#imageCarousel, #p_imageCarousel) { position: relative; margin-top: 18px !important; direction: ltr; }
.req-modal :is(#imageCarousel, #p_imageCarousel) .item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--req-line);
    border-radius: 14px;
    background: #f3f4f6;
}
.req-modal :is(#imageCarousel, #p_imageCarousel) .item img { width: 100% !important; height: 100% !important; object-fit: cover; transition: transform 0.3s; }
.req-modal :is(#imageCarousel, #p_imageCarousel) .item:hover img { transform: scale(1.04); }
.req-modal :is(#imageCarousel, #p_imageCarousel) .remove-image {
    top: 8px !important;
    right: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.55);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    box-shadow: none;
    backdrop-filter: blur(4px);
    transition: background 0.15s, transform 0.15s;
}
.req-modal :is(#imageCarousel, #p_imageCarousel) .remove-image:hover { background: var(--req-accent); transform: scale(1.08); }

/* Round arrows overlapping the row edges; hidden when there's nothing to scroll to. */
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    margin: 0;
    transform: translateY(-50%);
    pointer-events: none;
}
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav button.owl-prev,
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav button.owl-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px;
    margin: 0 -16px;
    padding: 0 !important;
    border: 1px solid var(--req-line) !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--req-text) !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.16);
    pointer-events: auto;
    transition: background 0.15s, color 0.15s, transform 0.15s, opacity 0.15s;
}
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav button.owl-prev:hover,
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav button.owl-next:hover {
    border-color: var(--req-accent) !important;
    background: var(--req-accent) !important;
    color: #fff !important;
    transform: scale(1.06);
}
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav button.disabled { opacity: 0; pointer-events: none; }
.req-modal :is(#imageCarousel, #p_imageCarousel) .owl-nav svg { display: block; }

/* Upload area: style.css only sizes #dropzone and gives the wrapper a beige background, so the
   customer-profile copy (#p_dropzone) shrank to its content. Same full-width box for every copy. */
.req-modal .image-upload-section { display: block; padding: 0; border-radius: 16px; background: none; }
.req-modal .image-upload-section .dropzone { width: 100%; height: auto; padding: 28px 16px; transition: border-color 0.15s, background 0.15s; }
.req-modal .image-upload-section .dropzone p { margin: 0 0 10px; }
.req-modal .image-upload-section .dropzone.dragover { border-color: var(--req-accent); background: var(--req-accent-soft); }
