.sp-login-menu-wrapper {
    position: relative;
    display: inline-block;
}

.sp-user-icon {
    cursor: pointer;
}

.sp-account-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 15px;
    min-width: 200px;
    z-index: 1000;
}

.sp-login-menu-wrapper:hover .sp-account-menu {
    display: block;
}

/* Popup styles */
.sp-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.sp-popup-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 40px 50px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    font-family: "Heebo", Sans-serif;
    direction: rtl;
    text-align: right;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sp-popup-content h2 {
    font-family: "Heebo", Sans-serif;
    color: #FFD100;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

#sp-login-form label,
#sp-register-form label {
    display: none;
}

#sp-login-form input,
#sp-register-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-family: "Heebo", Sans-serif;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    text-align: right;
}

#sp-login-form input::placeholder,
#sp-register-form input::placeholder {
    color: #666;
}

#sp-login-form input:focus,
#sp-register-form input:focus {
    outline: none;
    border-color: #FFD100;
}

#sp-login-form button[type="submit"],
#sp-register-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #FFED99;
    color: #351E18;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 25px 0;
}

#sp-login-form button[type="submit"]:hover,
#sp-register-form button[type="submit"]:hover {
    border-color: #351E18;
}

.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #FFD100;
}

.form-links .separator {
    margin: 0 10px;
    color: #666;
}

/* Обновляем стили для полей ввода */
#username, #password {
    background-color: #fff;
}

#username::placeholder {
    content: "אימייל";
}

#password::placeholder {
    content: "סיסמא";
}

/* Стиль для кнопки закрытия */
.sp-close {
    position: absolute;
    left: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.sp-close:hover {
    opacity: 1;
}

.sp-login-error {
    color: #cc0000;
    font-family: "Heebo", Sans-serif;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    display: none;
}

/* Loading state */
#sp-login-form button.loading,
#sp-register-form button.loading {
    position: relative;
    color: transparent;
    border-color: transparent;
}

#sp-login-form button.loading:after,
#sp-register-form button.loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.sp-account-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: "Heebo", Sans-serif;
}

.sp-account-links li {
    margin-bottom: 10px;
}

.sp-account-links li:last-child {
    margin-bottom: 0;
}

.sp-account-links a {
    color: #351E18;
    fill: #351E18;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    font-size: 16px;
    font-weight: 400;
}

.sp-account-links a:hover {
    color: #4a2b23;
}

/* Добавляем разделитель между пунктами меню */
.sp-account-links li:not(:last-child) {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Стиль для кнопки выхода */
.sp-account-links li:last-child a {
    color: #cc0000;
}

.sp-account-links li:last-child a:hover {
    color: #ff0000;
}

/* Добавляем стили для текста в попапе */
.sp-popup-content h2,
.sp-popup-content label,
.sp-popup-content a {
    font-family: "Heebo", Sans-serif;
    color: #351E18;
}

.sp-popup-content h2 {
    font-size: 24px;
    font-weight: 500;
}

.sp-popup-content label {
    font-size: 16px;
    font-weight: 400;
}

.form-links {
    text-align: center;
    margin-top: 15px;
}

.form-links a {
    color: #351E18;
    text-decoration: none;
    font-size: 14px;
}

.form-links .separator {
    margin: 0 10px;
    color: #351E18;
    opacity: 0.5;
}

#sp-register-form {
    display: none;
}

/* RTL специфичные стили */
.sp-popup-content {
    direction: rtl;
    text-align: right;
}

.sp-close {
    right: auto;
    left: 15px;
}

#sp-login-form label,
#sp-register-form label {
    text-align: right;
}

/* Стили для поля пароля и ссылки "забыли пароль" */
.password-field {
    position: relative;
    margin-bottom: 25px;
}

.forgot-password {
    position: absolute;
    right: 0;
    bottom: -20px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #FFD100;
}

/* Стили для блока регистрации */
.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.register-link .switch-to-register {
    color: #351E18;
    text-decoration: none;
    font-weight: 600;
    margin-right: 5px;
    transition: color 0.3s ease;
}

.register-link .switch-to-register:hover {
    color: #FFD100;
}

/* Стили для переключения форм */
#sp-login-form,
#sp-register-form {
    transition: opacity 0.3s ease;
}

#sp-register-form {
    display: none;
}

/* Стили для ссылок переключения */
.register-link,
.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.switch-to-register,
.switch-to-login {
    color: #351E18;
    text-decoration: none;
    font-weight: 600;
    margin-right: 5px;
    transition: color 0.3s ease;
}

.switch-to-register:hover,
.switch-to-login:hover {
    color: #FFD100;
}

/* Стили для заголовков форм */
#sp-login-form h2,
#sp-register-form h2 {
    font-family: "Heebo", Sans-serif;
    color: #FFD100;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* Стили для полей ввода в форме регистрации */
#reg_email::placeholder {
    content: "אימייל";
}

#reg_password::placeholder {
    content: "סיסמה";
}

#reg_password_confirm::placeholder {
    content: "אימות סיסמה";
}

/* Add these styles */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    z-index: 1;
}

.password-toggle:hover {
    color: #FFD100;
}

/* Update input padding to accommodate the icon */
#sp-login-form input[type="password"],
#sp-register-form input[type="password"] {
    padding-left: 35px;
}

/* Social Login Styles */
.social-login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.social-login-divider:before,
.social-login-divider:after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 100px);
    height: 1px;
    background-color: #E5E5E5;
}

.social-login-divider:before {
    right: 0;
}

.social-login-divider:after {
    left: 0;
}

.social-login-divider span {
    background: #fff;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

.social-login-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-login-btn {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    color: #351E18;
    border: 2px solid #351E18;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-login-btn i {
    margin-right: 10px;
    font-size: 18px;
}

.facebook-login:hover,
.google-login:hover {
    background: #ffffff;
    border-color: #351E18;
    color: #351E18;
}

/* Добавляем текст к кнопкам */
.google-login:after {
    content: "Google";
    margin-right: 8px;
}

.facebook-login:after {
    content: "Facebook";
    margin-right: 8px;
} 