.main-signin {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #FFFFFF;
    z-index: -1002;
    opacity: 0;
    transition: opacity, transform 0.3s ease;
    transform: scale(0.5);
    top: calc(50% - 155px);
    right: calc(50% - 150px);
    width: 300px;
    height: max-content;
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.7);
}
.main-signin.show {
    opacity: 1;
    z-index: 1002;
    transform: scale(1);
}

.signin-signup-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 300px;
    height: max-content;
    min-height: 300px;
}

.signin-phone-step, .signin-password-step, .signin-otp-step, .signin-signup-step {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    overflow: hidden;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 16px;
    opacity: 0;
    z-index: -1003;
    box-sizing: border-box;
    transition: opacity 0.3s ease, z-index 0.3s ease;
}
.signin-phone-step.show, .signin-password-step.show, .signin-otp-step.show, .signin-signup-step.show {
    opacity: 1;
    z-index: 1003;
}

.signin-signup-panel-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.close-signin-signup-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.close-signin-signup-panel:hover {
    background-color: var(--color-bg-soft);
}
.close-signin-signup-panel img {
    pointer-events: none;
}

.signin-signup-panel-title {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.signin-signup-panel-title p {
    margin: 0;
    font-size: clamp(14px, 1.7vw, 18px);
    font-weight: 600;
    color: var(--color-text);
}

.signin-back-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.signin-back-btn img {
    width: 18px;
    height: 18px;
    margin-right: -4px;
}

.signin-back-btn-tooltip {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: absolute;
    padding: 4px;
    width: max-content;
    box-sizing: border-box;
    top: 100%;
    left: 0;
    opacity: 1;
    z-index: 1003;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-soft);
    box-shadow: 2px 4px 8px rgba(10, 10, 10, 0.1);
    transition: opacity 0.3s, z-index 0.3s;
}
.signin-back-btn-tooltip p {
    font-size: 12px;
    color: var(--color-text);
    margin: 0;
    font-weight: 500;
}

.signin-phone-step-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

.signin-signup-mode-selection {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

.signin-signup-mode {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--color-text);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.signin-signup-mode.active {
    background: var(--color-primary);
    color: #FFFFFFFF;
}
.signin-signup-mode:not(.active):hover {
    background-color: rgba(212, 175, 55, 0.2);
}
.signin-signup-mode p {
    font-size: clamp(12px, 1.5vw, 16px);
    font-weight: 500;
    margin: 0;
}

.signin-signup-panel-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.username-input-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;

}
.username-input-container p, .signup-step-password p, .signup-step-repeat-password p {
    margin: 0;
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 400;
    color: var(--color-text);
}
.username-input-container input, .signup-step-password input, .signup-step-repeat-password input  {
    width: 220px;
    height: 40px;
    font-size: clamp(12px, 1.3vw, 15px);
    line-height: 22px;
    font-weight: 400;
    background-color: var(--color-bg-soft);
    border-radius: 6px;
    border-width: 1px;
    border-color: var(--color-border);
    color: var(--color-text);
    border-style: solid;
    outline: none;
    direction: rtl;
    padding: 0 12px 0 36px;
    font-family: "PeydaWebVF", serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.username-input-container img {
    position: absolute;
    top: calc(50% - 0px);
    left: 10px;
    width: 16px;
    height: 16px;
    user-select: none;
    pointer-events: none;
}
.username-input-container input:hover {
    background-color: var(--color-bg);
    border-color: #DEE1E6FF;
}
.username-input-container input:focus {
    background-color: var(--color-bg);
    border-color: #bdbfc4;
}


.signin-signup-username-submit {
    position: relative;
    width: 242px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFFFF;
    background-color: var(--color-primary);
    opacity: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}
.signin-signup-username-submit p {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    font-weight: 500;
}
.signin-signup-username-submit:hover:active {
    color: #FFFFFFFF;
    background-color: var(--color-primary);
}
.signin-signup-username-submit.disabled {
    opacity: 0.4;
}



.signin-password-step-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    margin-top: 60px;
}

.forget-password-btn {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    color: var(--color-text);
    width: 100%;
    transition: background-color 0.3s ease;
}
.forget-password-btn:hover {
    color: var(--color-secondary);
}
.forget-password-btn p{
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    text-align: right;
}

.signin-otp-step-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 16px;
    margin-top: 70px;
}
.otp-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.otp-step-message {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    direction: rtl;
}
.otp-message {
    margin: 0;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    text-align: right;
    color: #6D6D6D;
}

.otp-phone-number-message {
    margin: 0;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    text-align: right;
    color: var(--color-secondary);
}

.otp-inputs-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    direction: ltr;
}

.otp-inputs-container input {
    background: #FFFFFF;
    border: 1px solid #E7E7E7;
    border-radius: 8px;
    height: 40px;
    padding: 5px 15px 0 15px;
    width: 40px;
    box-sizing: border-box;
    color: #3d3d3d;
    font-size: 16px;
    font-weight: 600;
    font-family: "PeydaWebVF", serif;
    transition: border-color 0.3s ease;
}
.otp-inputs-container input:focus {
    outline: none;
    border-color: #cccccc;
}
.otp-inputs-container input.active {
    border-color: #cccccc;
}

.resend-otp-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 30px;
}

.resend-otp-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background: var(--color-primary);
    box-shadow: 0px 10px 20px rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    cursor: none;
    pointer-events: none;
    opacity: 0.5;
}
.resend-otp-btn.enable {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}
.resend-otp-btn p {
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    text-align: center;
    color: #FFFFFF;
    flex: none;
    order: 0;
    flex-grow: 0;
    margin: 0;
}

.resend-otp-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.resend-otp-timer p {
    margin: 0;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 21px;
    text-align: right;
    color: #626262;
}






.signup-step-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.signup-step-password-inputs-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.loading-spinner-phone-step, .loading-spinner-password-step {
    position: absolute;
    top: calc(50% - 10px);
    left: 8px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-secondary);
    border-top-color: var(--color-bg-soft);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-spinner-phone-step.show, .loading-spinner-password-step.show {
    opacity: 1;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.check-password-strong {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 8px 0;
}

.check-password-strong-term {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    direction: rtl;
}
.check-password-strong-term img {
    width: 14px;
    height: 14px;
    margin-left: 8px;
}
.check-password-strong-term p {
    font-style: normal;
    font-weight: 500;
    font-size: 11px;
    text-align: right;
    color: #6D6D6D;
    margin: 0;
}

.signup-step-password, .signup-step-repeat-password {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}
