/* ============================================================
   Search Builder — "Can't find?" Panel  +  Requirements Modal
   ============================================================ */

/* ── Wrapper: search form + panel side by side ── */
.cre-search-with-panel {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

/* Search builder wrapper / advanced module fill the available width */
.cre-search-with-panel > .houzez-search-builder-wrapper,
.cre-search-with-panel > .advanced-search-module {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Clickable panel ── */
.cre-cant-find-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Compact padding so content stays within the fields-row height */
    gap: 10px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #dde1ea;
    border-radius: 6px;
    cursor: pointer;
    /* Fluid: ~22% of parent, bounded 150–240px, shrinkable */
    flex: 0 1 clamp(150px, 22%, 240px);
    min-width: 150px;
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    user-select: none;
}

.cre-cant-find-panel:hover {
    background: #f4f7ff;
    border-color: #b0bde8;
    box-shadow: 0 3px 14px rgba(37, 99, 235, 0.12);
}

.cre-cant-find-panel:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Icon sized to sit comfortably in a single-row fields wrapper */
.cre-cant-find-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #2563eb;
    opacity: 0.85;
}

.cre-cant-find-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.35;
    min-width: 0;
}

/* Tablet (768–1024px): panel drops below the fields row */
@media (max-width: 1024px) {
    .cre-search-with-panel {
        flex-wrap: wrap;
        gap: 8px;
    }

    .cre-cant-find-panel {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
    }

    .cre-cant-find-icon {
        width: 22px;
        height: 22px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .cre-cant-find-label {
        font-size: 11px;
    }
}


/* ============================================================
   Requirements Modal
   ============================================================ */

.cre-requirements-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.cre-requirements-overlay.is-active {
    display: flex;
}

/* Reserve scrollbar gutter so content never shifts when scrollbar appears/disappears */
html {
    scrollbar-gutter: stable;
}

body.cre-modal-open {
    overflow: hidden;
    /* Override any scrollbar-compensation padding Bootstrap injects on dropdown open */
    padding-right: 0 !important;
}


.cre-requirements-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px 26px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
    animation: cre-dialog-appear 0.2s ease;
}

@keyframes cre-dialog-appear {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cre-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
}

.cre-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.cre-modal-heading {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    padding-right: 36px;
}

.cre-modal-subheading {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 22px;
}

/* ── Form layout ── */
.cre-req-form .cre-form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.cre-req-form .cre-form-row .cre-field {
    flex: 1;
    min-width: 0;
}

.cre-req-form .cre-field {
    margin-bottom: 14px;
}

.cre-req-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}

.cre-req-form label .cre-required {
    color: #ef4444;
    margin-left: 2px;
}

.cre-req-form .cre-input,
.cre-req-form .cre-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    color: #1f2937;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}

.cre-req-form .cre-input:focus,
.cre-req-form .cre-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
    outline: none;
    background: #fff;
}

.cre-req-form .cre-textarea {
    resize: vertical;
    min-height: 88px;
}

/* ── Bootstrap Select inside modal ── */
.cre-requirements-dialog .bootstrap-select.form-control {
    padding: 0;
    border: none;
    background: transparent;
    height: auto;
}

.cre-requirements-dialog .bootstrap-select > .dropdown-toggle.btn {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    background: #f9fafb;
    padding: 9px 12px;
    color: #1f2937;
    font-family: inherit;
    transition: border-color 0.15s;
    width: 100%;
}

.cre-requirements-dialog .bootstrap-select > .dropdown-toggle.btn:focus,
.cre-requirements-dialog .bootstrap-select > .dropdown-toggle.btn:active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
    outline: none;
}

.cre-requirements-dialog .bootstrap-select.show > .dropdown-toggle.btn {
    border-color: #2563eb;
}

/* ── Min / max range inputs ── */
.cre-minmax-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cre-minmax-row .cre-input {
    flex: 1;
    min-width: 0;
}

.cre-range-sep {
    color: #9ca3af;
    font-size: 13px;
    flex-shrink: 0;
}

/* ── Status / feedback message ── */
.cre-req-status-msg {
    display: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.cre-req-status-msg.cre-success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.cre-req-status-msg.cre-error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ── Submit button ── */
.cre-btn-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 7px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.cre-btn-submit:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.cre-btn-submit:active:not(:disabled) {
    background: #1e40af;
}

.cre-btn-submit:disabled,
.cre-btn-submit.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 500px) {
    .cre-requirements-dialog {
        padding: 24px 16px 20px;
    }

    .cre-req-form .cre-form-row {
        flex-direction: column;
        gap: 0;
    }

    .cre-req-form .cre-form-row .cre-field {
        margin-bottom: 14px;
    }

    .cre-minmax-row {
        flex-direction: column;
        gap: 6px;
    }

    .cre-range-sep {
        display: none;
    }
}


/* ============================================================
   Form sections, PEZA toggle, unit decorators
   ============================================================ */

/* Section blocks with labelled divider */
.cre-form-section {
    margin-bottom: 6px;
}
.cre-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 14px;
}
.cre-form-section:first-child .cre-section-header {
    margin-top: 4px;
}
.cre-section-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #2563eb;
    white-space: nowrap;
}
.cre-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Optional label helper */
.cre-optional {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 2px;
}

/* Half-width standalone field (e.g. Tel Number, Target Date) */
.cre-field-half {
    width: calc(50% - 7px);
}

/* Suffix unit (sqm) inside range inputs */
.cre-input-unit-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.cre-input-unit-wrap .cre-unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #9ca3af;
    pointer-events: none;
}
.cre-input-has-unit {
    padding-right: 42px !important;
}

/* Prefix unit (₱) inside budget inputs */
.cre-input-has-prefix {
    position: relative;
    flex: 1;
    min-width: 0;
}
.cre-unit-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}
.cre-input-has-prefix .cre-input {
    padding-left: 22px;
}

/* PEZA Yes / No radio toggle cards */
.cre-peza-group {
    display: flex;
    gap: 10px;
}
.cre-peza-opt {
    position: relative;
    cursor: pointer;
}
.cre-peza-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cre-peza-opt span {
    display: block;
    padding: 9px 32px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    color: #374151;
    background: #f9fafb;
    transition: border-color .15s, background .15s, color .15s;
    user-select: none;
    font-family: inherit;
    font-weight: 500;
}
.cre-peza-opt span:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.cre-peza-opt input[type="radio"]:checked + span {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}
.cre-peza-opt input[type="radio"]:focus-visible + span {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 500px) {
    .cre-field-half { width: 100%; }
    .cre-peza-opt span { padding: 9px 22px; }
}


/* ============================================================
   "Submit Your Requirements" header nav menu item
   ============================================================ */

/* Desktop: outlined pill button that inherits the nav link color */
.houzez-elementor-menu li.menu-item-16691 > a.nav-link {
    border: 1.5px solid currentColor;
    border-radius: 20px;
    padding-top:    5px !important;
    padding-bottom: 5px !important;
    padding-left:   15px !important;
    padding-right:  15px !important;
    font-weight: 600;
    margin-left: 10px;
    transition: background 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    white-space: nowrap;
}

.houzez-elementor-menu li.menu-item-16691 > a.nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

/* Round the theme's pseudo-element hover highlight to match the pill border */
.houzez-elementor-menu li.menu-item-16691 > a.nav-link::before,
.houzez-elementor-menu li.menu-item-16691 > a.nav-link::after {
    border-radius: 20px !important;
}

/* Mobile offcanvas: bold + blue tint to distinguish from nav links */
.mobile-navbar-nav li.menu-item-16691 > a.nav-link {
    font-weight: 700;
    color: #2563eb;
    border-left: 3px solid #2563eb;
    padding-left: 12px;
}


/* ============================================================
   "Submit Requirements" status tab
   ============================================================ */

/* Visually separate from the status filter tabs */
li.cre-req-tab-item {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

#houzez-search-tabs-wrap .cre-req-tab-link {
    font-weight: 600;
    letter-spacing: 0.01em;
}
