.alh-real-estate-form-container {
    width: 100%;
}

.alh-form-fields-wrapper {
    display: flex;
    flex-wrap: wrap;
    row-gap: 40px;
    column-gap: 40px;
}

.alh-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.alh-col-100 { width: 100%; }
.alh-col-80  { width: calc(80% - 20px); }
.alh-col-75  { width: calc(75% - 20px); }
.alh-col-66  { width: calc(66.66% - 20px); }
.alh-col-60  { width: calc(60% - 20px); }
.alh-col-50  { width: calc(50% - 20px); }
.alh-col-40  { width: calc(40% - 20px); }
.alh-col-33  { width: calc(33.33% - 27px); }
.alh-col-25  { width: calc(25% - 30px); }
.alh-col-20  { width: calc(20% - 32px); }

/* Inline Select */
.alh-form-group-inline {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.alh-form-group-inline .alh-form-select-wrapper {
    flex-grow: 1;
}

.alh-form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #1f1b33;
}

.alh-form-group-inline .alh-form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.alh-form-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #1f1b33;
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    color: #1f1b33;
    outline: none;
    transition: border-color 0.3s ease;
    box-shadow: none !important;
}

.alh-form-field:focus {
    border-bottom-color: #38b6ff;
}

.alh-form-field::placeholder {
    color: #1f1b33;
    opacity: 0.8;
}

/* Select wrapper */
.alh-form-select-wrapper {
    position: relative;
    width: 100%;
}

/* Hide native select visually while keeping it accessible in DOM */
.alh-form-select-native {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

/* Hide legacy triangle pseudo-element */
.alh-form-select-wrapper::after {
    display: none !important;
}

/* Custom Select Root */
.alh-custom-select {
    position: relative;
    width: 100%;
    user-select: none;
    outline: none;
}

/* Trigger / Selected Value Display */
.alh-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #1f1b33;
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #1f1b33;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.alh-custom-select:hover .alh-custom-select-trigger,
.alh-custom-select.is-open .alh-custom-select-trigger,
.alh-custom-select:focus .alh-custom-select-trigger {
    border-bottom-color: #38b6ff;
}

.alh-custom-select-current {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-align: left;
}

/* Arrow Icon */
.alh-custom-select-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 14px;
    color: #1f1b33;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
    flex-shrink: 0;
}

.alh-custom-select:hover .alh-custom-select-arrow,
.alh-custom-select.is-open .alh-custom-select-arrow {
    color: #38b6ff;
}

.alh-custom-select.is-open .alh-custom-select-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu Popup */
.alh-custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 230px;
    max-width: 100%;
    background-color: #ffffff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(31, 27, 51, 0.12), 0 4px 12px rgba(31, 27, 51, 0.04);
    padding: 6px;
    z-index: 9999;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.22s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.alh-custom-select.is-open .alh-custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Flip upward when near viewport bottom */
.alh-custom-select.opens-up .alh-custom-select-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    transform-origin: bottom center;
    transform: translateY(8px) scale(0.98);
}

.alh-custom-select.opens-up.is-open .alh-custom-select-dropdown {
    transform: translateY(0) scale(1);
}

/* Dropdown Options */
.alh-custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 2px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f1b33;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.alh-custom-select-option:hover {
    background-color: #f5f7fa;
    color: #38b6ff;
    padding-left: 17px;
}

.alh-custom-select-option.is-selected {
    background-color: rgba(56, 182, 255, 0.08);
    color: #1f1b33;
    font-weight: 600;
}

.alh-custom-select-option.is-selected:hover {
    background-color: rgba(56, 182, 255, 0.14);
    color: #38b6ff;
}

.alh-custom-select-option-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alh-custom-select-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    opacity: 0;
    transform: scale(0.6);
    color: #38b6ff;
    transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.alh-custom-select-option.is-selected .alh-custom-select-check {
    opacity: 1;
    transform: scale(1);
}

/* Textarea */
.alh-form-textarea {
    resize: vertical;
    min-height: 35px;
}

/* Checkbox */
.alh-form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.5;
}

.alh-form-checkbox-label a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.alh-form-checkbox-label a:hover {
    color: #5bb2e8;
    opacity: 0.85;
}

.alh-form-checkbox {
    width: auto;
    margin-top: 3px;
    cursor: pointer;
}

/* Submit Button */
.alh-form-submit-wrapper {
    margin-top: 40px;
    display: flex;
}

.alh-align-start { justify-content: flex-start; }
.alh-align-center { justify-content: center; }
.alh-align-end { justify-content: flex-end; }
.alh-align-stretch { justify-content: stretch; }
.alh-align-stretch .alh-form-submit-btn { width: 100%; }

.alh-form-submit-btn {
    background: transparent;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 16px;
    color: #1f1b33;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.alh-form-submit-btn:hover {
    opacity: 0.7;
}

.alh-form-submit-icon {
    font-size: 20px;
    line-height: 1;
}

.alh-form-btn-loading .alh-form-submit-icon {
    animation: alh-spin 1s linear infinite;
    display: inline-block;
}

@keyframes alh-spin {
    100% { transform: rotate(360deg); }
}

/* Messages */
.alh-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.alh-form-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

.alh-form-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .alh-col-tablet-100 { width: 100%; }
    .alh-col-tablet-50  { width: calc(50% - 20px); }
}

@media (max-width: 767px) {
    .alh-col-mobile-100 { width: 100%; }
    .alh-col-mobile-50  { width: calc(50% - 10px); }
    
    .alh-form-fields-wrapper {
        row-gap: 25px;
        column-gap: 20px;
    }
    
    .alh-form-group {
        width: 100% !important; /* Force full width on mobile unless overridden */
    }
    
    .alh-form-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
