/* Client Login Modal Styles */
.client-login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: auto;
}

    .client-login-modal-overlay.show {
        display: flex;
    }
    
    /* Prevent background clicks when modal is open */
    body.modal-open {
        overflow: hidden;
    }
    
    /* Disable pointer events on all elements except modals when modal is open */
    body.modal-open #mainHeader,
    body.modal-open main,
    body.modal-open footer,
    body.modal-open .container,
    body.modal-open section {
        pointer-events: none;
    }
    
    /* Ensure modal overlay and modal content remain clickable */
    body.modal-open .client-login-modal-overlay,
    body.modal-open .client-login-modal,
    body.modal-open .join-partner-modal-overlay,
    body.modal-open .join-partner-modal {
        pointer-events: auto;
    }

.client-login-modal {
    position: relative;
    width: 552px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--Colors-Gray-White, white);
    border-radius: 24px;
    box-shadow: 0px 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 100001;
}

    .client-login-modal.show {
        display: inline-flex;
    }

.client-login-modal-close {
    position: absolute;
    top: 24px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LTR: Close button at right side */
[dir="ltr"] .client-login-modal-close {
    right: 24px;
    left: auto;
}

/* RTL: Close button at left side */
[dir="rtl"] .client-login-modal-close {
    left: 24px;
    right: auto;
}

/* Login Form Container */
.client-login-empty {
    width: 100%;
    padding: 48px 24px;
    position: relative;
    background: var(--Colors-Gray-White, white);
    border-radius: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    display: inline-flex;
    box-sizing: border-box;
}

.client-login-logout {
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    display: flex;
}

.client-login-icon {
    width: 80px;
    height: 80px;
    background: var(--Primary-50, #F3F2F6);
    border-radius: 40px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: inline-flex;
}

.client-login-icon-svg {
    position: relative;
}

.client-login-title {
    align-self: stretch;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    text-align: center;
    color: var(--Colors-Gray-Darkest, #111111);
    font-size: 24px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 700;
    word-wrap: break-word;
}

.client-login-text-field {
    align-self: stretch;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    display: flex;
}

.client-login-label {
    align-self: stretch;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    text-align: right;
    justify-content: center;
    display: flex;
    flex-direction: column;
    color: var(--Colors-Gray-Dark, #666666);
    font-size: 16px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 500;
    word-wrap: break-word;
}

[dir="ltr"] .client-login-label {
    text-align: left;
}

.client-login-field {
    align-self: stretch;
    padding: 16px;
    background: var(--Colors-Gray-White, white);
    overflow: hidden;
    border-radius: 12px;
    outline: 1px var(--Colors-Gray-Lighter, #E6E6E6) solid;
    outline-offset: -1px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: inline-flex;
    flex-direction: row-reverse;
}

[dir="ltr"] .client-login-field {
    flex-direction: row;
}

.client-login-placeholder {
    flex: 1 1 0;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    text-align: right;
    justify-content: center;
    display: flex;
    flex-direction: column;
    color: var(--Colors-Gray-Default, #999999);
    font-size: 14px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 500;
    word-wrap: break-word;
}

[dir="ltr"] .client-login-placeholder {
    text-align: left;
}

.client-login-input {
    flex: 1 1 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--Colors-Gray-Darkest, #111111);
    font-size: 14px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 500;
    width: 100%;
    text-align: right;
}

[dir="ltr"] .client-login-input {
    text-align: left;
}

.client-login-input::placeholder {
    color: var(--Colors-Gray-Default, #999999);
}

#clientLoginForm {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.client-login-text-field .text-danger {
    align-self: stretch;
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
    text-align: right;
}

[dir="ltr"] .client-login-text-field .text-danger {
    text-align: left;
}

.client-login-field-icon {
    position: relative;
}

@keyframes aq-login-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.client-login-button {
    align-self: stretch;
    height: 64px;
    padding: 0 16px;
    background: var(--Primary-500, #6A5D8B);
    border-radius: 16px;
    justify-content: center;
    align-items: center;
    display: inline-flex;
    position: relative;
    overflow: visible;
    cursor: pointer;
    border: none;
}

    .client-login-button:hover {
        opacity: 0.9;
    }

    .client-login-button:active {
        opacity: 0.8;
    }

.client-login-button.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.client-login-button.is-loading .client-login-button-text {
    visibility: hidden;
}

.client-login-button.is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    margin: -0.675rem 0 0 -0.675rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aq-login-btn-spin 0.65s linear infinite;
}

.client-login-button-text {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    text-align: right;
    color: var(--Colors-Gray-White, white);
    font-size: 20px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 700;
    word-wrap: break-word;
}

[dir="ltr"] .client-login-button-text {
    text-align: left;
}

.client-login-footer {
    width: 100%;
    max-width: 504px;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
    text-align: center;
}

[dir="ltr"] .client-login-footer-link {
    direction: ltr;
}

.client-login-footer-text {
    color: var(--Colors-Gray-Dark, #666666);
    font-size: 16px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 500;
    word-wrap: break-word;
}

.client-login-footer-link {
    color: var(--Primary-500, #6A5D8B);
    font-size: 16px;
    font-family: IBM Plex Sans Arabic;
    font-weight: 700;
    word-wrap: break-word;
    text-align: center;
}

@@media (max-width: 768px) {
    .client-login-modal {
        width: 95vw;
        max-height: 85vh;
    }
}
