/* ============================================
   REGISTRATION FORM UI/UX FIXES
   ============================================ */

/* FIX 1: Phone Verify Button - Scale down and fit inside input */
.view-view-button-verify-phone {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
    height: 22px;
    display: flex;
    align-items: center;
}

/* RTL (Arabic) - Verify button on the left */
html[lang="ar"] .view-view-button-verify-phone {
    right: auto;
    left: 10px;
}

.verify-phone-btn {
    background: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 3px 7px;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    max-width: 60px;
}

.verify-phone-btn:hover {
    background: #000;
    transform: scale(1.05);
}

.verify-phone-btn:active {
    transform: scale(0.98);
}

/* Adjust phone input to accommodate verify button */
.cs-intputwrap input[name="phone"] {
    padding-right: 70px !important;
}

/* RTL (Arabic) - Adjust phone input padding */
html[lang="ar"] .cs-intputwrap input[name="phone"] {
    padding: 10px 50px 10px 70px !important;
}

/* FIX 2: Consistent dropdown styling for all select fields */
.main-register select,
.main-register .nice-select {
    height: 38px;
    line-height: 38px;
    font-size: 10px;
    padding: 0 14px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-register select:focus,
.main-register .nice-select:focus,
.main-register .nice-select.open {
    background: #fff;
    border-color: var(--main-color);
    box-shadow: 0px 10px 14px 0px rgba(12, 0, 46, 0.04);
}

/* Dropdown options styling */
.main-register .nice-select .list {
    border-radius: 4px;
    box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    margin-top: 4px;
}

.main-register .nice-select .option {
    font-size: 10px;
    padding: 8px 14px;
    min-height: 32px;
    line-height: 1.4;
    transition: background 0.2s ease;
}

.main-register .nice-select .option:hover {
    background: #f9f9f9;
}

.main-register .nice-select .option.selected {
    background: var(--main-color);
    color: #fff;
    font-weight: 600;
}

/* FIX 3: Input field consistency - ensure all inputs have same height */
.main-register input[type="text"],
.main-register input[type="email"],
.main-register input[type="password"],
.main-register input[type="file"],
.main-register select,
.main-register textarea {
    font-size: 10px;
}

/* FIX 4: File input styling improvements */
.main-register input[type="file"] {
    font-size: 9px;
    padding: 8px 12px;
    cursor: pointer;
}

.main-register input[type="file"]::-webkit-file-upload-button {
    background: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 9px;
    cursor: pointer;
    margin-right: 8px;
    transition: background 0.3s ease;
}

.main-register input[type="file"]::-webkit-file-upload-button:hover {
    background: #000;
}

/* FIX 5: Label spacing consistency */
.main-register .cs-intputwrap label,
.main-register .cs-intsputwrap label {
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 500;
    display: block;
    color: #333;
}

/* FIX 6: Error message styling */
.main-register .parsley-errors-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
}

.main-register .parsley-errors-list li {
    color: #e74c3c;
    font-size: 9px;
    margin-top: 2px;
}

.main-register input.parsley-error,
.main-register select.parsley-error,
.main-register textarea.parsley-error {
    border-color: #e74c3c !important;
    background: #fff5f5 !important;
}

/* FIX 7: Submit button consistency */
.main-register .commentssubmit {
    width: 100%;
    height: 42px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-register .commentssubmit:hover {
    transform: translateY(-2px);
    box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
}

/* FIX 8: Spacing adjustments for newly added fields */
.main-register .cs-intputwrap,
.main-register .cs-intsputwrap {
    margin-bottom: 8px;
    position: relative;
}

/* FIX 9: Icon alignment in input fields */
.main-register .cs-intputwrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: var(--main-color);
    z-index: 10;
    pointer-events: none;
}

/* FIX 9A: RTL (Arabic) - Icon alignment on the right */
html[lang="ar"] .main-register .cs-intputwrap i {
    left: auto;
    right: 20px;
}

/* Adjust input padding for RTL to accommodate right-side icon */
html[lang="ar"] .main-register .cs-intputwrap input[type="text"],
html[lang="ar"] .main-register .cs-intputwrap input[type="email"],
html[lang="ar"] .main-register .cs-intputwrap input[type="password"] {
    padding: 10px 50px 10px 20px;
}

/* FIX 10: Mobile responsiveness improvements */
@media (max-width: 768px) {
    .verify-phone-btn {
        padding: 3px 6px;
        font-size: 8px;
        height: 20px;
        min-width: 45px;
        max-width: 55px;
    }

    .cs-intputwrap input[name="phone"] {
        padding-right: 65px !important;
    }

    .main-register .nice-select .option {
        font-size: 11px;
        padding: 10px 12px;
    }
}

/* FIX 11: Focus states for better accessibility */
.main-register input:focus,
.main-register select:focus,
.main-register textarea:focus {
    outline: none;
    border-color: var(--main-color) !important;
    box-shadow: 0 0 0 3px rgba(238, 120, 56, 0.1);
}

/* FIX 12: Password toggle button alignment */
.main-register .view-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 11;
    font-size: 1.1em;
    color: #666;
}

/* RTL (Arabic) - Password toggle on the left */
html[lang="ar"] .main-register .view-pass {
    right: auto;
    left: 14px;
}

.main-register .pass-input-wrap input {
    padding-right: 45px !important;
}

/* RTL (Arabic) - Adjust password input padding */
html[lang="ar"] .main-register .pass-input-wrap input {
    /* padding: 10px 20px 10px 45px !important; */
}

/* FIX 13: Checkbox styling improvements */
.main-register .filter-tags input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

/* FIX 14: User type radio buttons visibility */
.main-register .filter-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-register .filter-tags label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

/* FIX 15: Ensure d-none class actually hides elements */
.d-none {
    display: none !important;
}

/* FIX 16: Smooth transitions for show/hide fields */
.agent_div,
.agency_div,
.agent_agency_div,
.agent_agency_select_div,
.pass_div {
    transition: opacity 0.3s ease, height 0.3s ease;
}

/* FIX 17: Placeholder styling consistency */
.main-register input::placeholder,
.main-register textarea::placeholder {
    color: #999;
    font-size: 10px;
    opacity: 1;
}

/* FIX 18: Loading state for submit button */
.main-register .commentssubmit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* FIX 19: Prevent layout shift from verify button */
.cs-intputwrap {
    position: relative;
}

.cs-intputwrap input {
    width: 100%;
}

/* FIX 20: Social login button spacing (ensure consistency) */
.main-register .soc-log {
    margin-top: 10px;
}

/* ============================================
   COUNTRY CODE PICKER INTEGRATION
   ============================================ */

/* FIX 21: Phone input container with country picker */
.phone-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

/* Country code select dropdown */
.country-code-select {
    height: 38px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 140px;
    max-width: 140px;
    font-family: var(--main-font);
    outline: none;
}

.country-code-select:focus,
.country-code-select:hover {
    background: #fff;
    border-color: var(--main-color);
    box-shadow: 0px 10px 14px 0px rgba(12, 0, 46, 0.04);
}

/* Phone number input (without country code) */
.phone-number-input {
    flex: 1;
    height: 38px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 4px;
    padding: 10px 70px 10px 14px !important;
    font-size: 10px;
    font-weight: 500;
    color: #222;
    font-family: var(--main-font);
    outline: none;
    transition: all 0.3s ease;
}

.phone-number-input:focus,
.phone-number-input:hover {
    background: #fff;
    border-color: var(--main-color);
    box-shadow: 0px 10px 14px 0px rgba(12, 0, 46, 0.04);
}

.phone-number-input::placeholder {
    color: #999;
    font-size: 10px;
}

/* Adjust verify button position for new layout */
.phone-input-container .view-view-button-verify-phone {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile icon positioning for phone container */
.phone-input-container>i.fa-mobile {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: var(--main-color);
    z-index: 10;
    pointer-events: none;
}

/* RTL (Arabic) Support for Country Picker */
html[lang="ar"] .phone-input-container {
    flex-direction: row-reverse;
}

html[lang="ar"] .country-code-select {
    text-align: right;
}

html[lang="ar"] .phone-number-input {
    padding: 10px 14px 10px 70px !important;
    text-align: right;
}

html[lang="ar"] .phone-input-container .view-view-button-verify-phone {
    right: auto;
    left: 10px;
}

html[lang="ar"] .phone-input-container>i.fa-mobile {
    left: auto;
    right: -25px;
}

/* Phone validation error styling */
.phone-validation-error {
    color: #e74c3c;
    font-size: 9px;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .country-code-select {
        width: 120px;
        max-width: 120px;
        font-size: 9px;
    }

    .phone-number-input {
        font-size: 9px;
    }

    .phone-input-container {
        gap: 6px;
    }
}