.form-control.is-invalid,
.was-validated .form-control:invalid {
    background-image: none !important;
}

[dir="rtl"] .password-toggle-icon{
    right: auto !important;
    left: 15px !important;
}
[dir="rtl"] .form__items{
    direction: rtl !important;
}
div.grecaptcha-badge {
    bottom: 120px !important;
}
form h3 {
    font-size: 32px !important;
}
label,
p,
.input__group p,
.frgtpass {
    font-size: 14px !important;
}

@media (max-width: 767.98px) {
    div.grecaptcha-badge {
        bottom: 65px !important;
    }
}

[dir="rtl"] .back-btn {
    transform: scaleX(-1);
}

/* Placeholder styling */
.form-control::placeholder {
    color: var(--text-grey) !important;
}

.form-control::-webkit-input-placeholder {
    color: var(--text-grey) !important;
}

.form-control::-moz-placeholder {
    color: var(--text-grey) !important;
}

.form-control:-ms-input-placeholder {
    color: var(--text-grey) !important;
}

#registration-form .form-label {
    color: var(--secondary-color) !important;
}
/* Mobile Drawer Styles (for both country and phone) */
.country-drawer-overlay,
.phone-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: flex-end;
}

.country-drawer {
    background: white;
    width: 100%;
    max-height: 80vh;
    min-height: 60vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}
.iti--fullscreen-popup #iti-0__dropdown-content {
    min-height: 60vh;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.country-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.country-drawer-header h5 {
    color: #333;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.btn-close::before {
    content: "×";
    font-size: 24px;
    line-height: 1;
}

.country-drawer-search {
    padding: 0 20px 15px 20px;
    flex-shrink: 0;
}

.country-drawer-search .form-control {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 12px 16px;
}

.country-drawer-options {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    max-height: calc(80vh - 140px);
}

.country-option-mobile {
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.country-option-mobile:hover,
.country-option-mobile:active {
    background-color: #f8f9fa;
}

.country-option-mobile:last-child {
    border-bottom: none;
}

/* Desktop dropdown styles */
.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    display: none;
}

.country-search-box {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.country-options {
    max-height: 250px;
    overflow-y: auto;
}

.country-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#country-selected {
    cursor: pointer;
}

.country-option:hover {
    background-color: #f8f9fa;
}

/* Responsive behavior - Hide drawers on desktop and dropdowns on mobile */
@media (min-width: 768px) {
    .country-drawer-overlay,
    .phone-drawer-overlay {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .country-dropdown {
        display: none !important;
    }

    .iti__search-input {
        width: 90% !important;
    }

    /* Override intl-tel-input dropdown to make it drawer-like on mobile */
    .iti__dropdown-content {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 80vh !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
        z-index: 9999 !important;
        animation: slideUpFromBottom 0.3s ease-out !important;
        border: none !important;
    }

    @keyframes slideUpFromBottom {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .iti__search-input {
        border-radius: 10px !important;
        border: 1px solid #ddd !important;
        padding: 12px 16px !important;
        margin: 20px !important;
        margin-bottom: 15px !important;
    }

    .iti__country-list {
        max-height: calc(80vh - 100px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 20px !important;
    }

    .iti__country {
        padding: 15px 20px !important;
        border-bottom: 1px solid #f8f9fa !important;
        min-height: 48px !important;
        display: flex;
        align-items: center !important;
    }

    .iti__country:hover,
    .iti__country:active {
        background-color: #f8f9fa !important;
    }

    .iti__country:last-child {
        border-bottom: none !important;
    }

    /* Make intl-tel-input country selector more touch-friendly on mobile */
    .iti__flag-container {
        cursor: pointer;
        touch-action: manipulation;
    }

    /* Style mobile input to show it's interactive */
    #country-selected {
        cursor: pointer;
        user-select: none;
    }
}

/* Additional mobile enhancements */
@media (max-width: 767.98px) {
    .country-drawer-options {
        -webkit-overflow-scrolling: touch;
    }

    .country-option-mobile {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}
