@charset "UTF-8";
@import url("fonts.css");
@import url("../fonts/icons/font/bootstrap-icons.css");

:root {
    --brand-pink: #ED1C62;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, h1, h2, h3, h4, h5, h6, input, button, select, textarea, p, span, a, label {
    font-family: 'Cairo', 'Simah', Poppins, sans-serif !important;
}

body {
    font-weight: 400;
    color: var(--purple);
    background-color: #ffffff;
}

input,
button,
select,
textarea {
    outline: 0 !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.login-main {
    display: flex;
    width: 100%;
    min-height: 100vh;
    direction: rtl; /* Sets overall direction to RTL */
    flex-direction: row-reverse; /* Reverses element order: Form (Left in DOM) -> Right, Banner (Right in DOM) -> Left */
}

/* Because we are using row-reverse on RTL:
   The HTML order is Banner, Form.
   Normal RTL: Banner (Right), Form (Left).
   Row-Reverse RTL: Banner (Left), Form (Right).
   This matches the desired visual layout (Image Left, Form Right).
*/

.banner-img {
    width: 50%;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #f8f8f8;
}

.banner-img::after {
    content: "";
    width: 300px;
    height: 150px;
    background-image: url('../assets/images/Vector.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login-main .form {
    width: 50%;
    min-height: 100vh;
    height: 100%;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 80px 120px; /* Increased side padding for better centering look */
    background-color: #fff;
}

.form h1 {
    font-size: 40px;
    font-weight: 500;
    color: #000;
    margin-bottom: 20px;
}

.form p {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.form .label {
    color: #000;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    display: block;
    text-align: right;
}

.input-div {
    display: flex;
    align-items: center;
    /* Removed flex-direction: row-reverse; standard RTL means Start (Right) -> End (Left) */
    /* We want HTML: Input (flex 1), Icon (auto).
       In RTL: Input (Right), Icon (Left).
       Visually: [ Input       Icon ]
       Screenshots show Icon on the LEFT.
       So standard RTL flex flow puts first child on right, second on left.
       Pass HTML: <input ...> <icon ...>
       Result: Input on Right, Icon on Left. Correct.
    */
    padding: 0 15px;
    height: 50px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    margin-bottom: 25px;
    background-color: #fff;
    transition: border-color 0.3s;
}

.input-div:focus-within {
    border-color: var(--brand-pink);
}

.input-div img, .input-div i {
    font-size: 18px;
    margin-right: 10px; /* Space between input text (right) and icon (left) */
    margin-left: 0;
    opacity: 0.5;
    color: #000;
}

.input-div input {
    flex: 1;
    height: 100%;
    border: none;
    font-size: 14px;
    color: #000;
    padding: 0;
    font-weight: 400;
    text-align: right;
    background: transparent;
}

.input-div input::placeholder {
    color: #C0C0C0;
}

.between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.remember-me {
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input {
    width: 24px;
    height: 24px;
    accent-color: var(--brand-pink);
    cursor: pointer;
    margin: 0;
}

/* Custom checkbox styling for rounded square with tick mark */
.remember-me input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    width: 24px;
    height: 24px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.remember-me input[type="checkbox"]::before {
    content: "";
    width: 14px;
    height: 14px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.remember-me input[type="checkbox"]:checked {
    border-color: var(--brand-pink);
    background-color: var(--brand-pink);
}

.remember-me input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.forgot {
    color: var(--brand-pink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

/* Button Styling matches screenshot: Pink, rounded, not full width?
   Actually, looking closer at "Register" screenshot, button seems to be auto width.
   "Login" screenshot has button aligned to right.
   Let's keep width auto/fit-content but with min-width or padding.
*/
button.login {
    margin: 10px 0 20px 0;
    background-color: var(--brand-pink);
    color: white;
    height: 50px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    padding: 0 40px;
    width: fit-content;
    align-self: flex-end; /* Aligns to the End (Left in RTL) */
    transition: background-color 0.3s;
}

button.login:hover {
    background-color: #d01856;
}

.or-divider {
    border-top: 1px solid #F0F0F0;
    margin: 40px 0 20px 0;
    position: relative;
    width: 100%;
}

.signUp {
    text-align: center;
    color: #000;
    font-size: 14px;
    margin-top: 0;
    font-weight: 600;
}

.signUp a {
    font-weight: 700;
    color: var(--brand-pink);
    text-decoration: none;
}

.btn-social-login {
    display: flex;
    width: 100%;
    margin-bottom: 7px;
}

.social-login-icon {
    width: 25px;
}

.error {
    width: 100%;
    margin-top: -15px; /* Pull closer to input */
    margin-bottom: 15px;
    font-size: 0.875em;
    color: #dc3545;
    display: block;
    text-align: right;
}

.btn-facebook {
    background-color: #405D9D !important;
    color: #fff !important;
}

.btn-google {
    background-color: #C94130 !important;
    color: #fff !important;
}

.btn-instagram {
    background-color: #bc2a8d !important;
    color: #fff !important;
}


@media (max-width: 992px) {
    .login-main {
        flex-direction: column-reverse; /* Banner top, Form bottom? Or Form top? Usually Form visible first on mobile. */
        /* If column-reverse: Form (Item 2) is Bottom? No. */
        /* Flex column reverse: Item 2, Item 1. Form, Banner. */
    }

    .banner-img {
        width: 100%;
        height: 300px;
        min-height: auto;
    }

    .login-main .form {
        width: 100%;
        min-height: auto;
        padding: 40px 20px;
        flex: 1;
    }
}
