/* Login Menu Link - Theme Style */
.login-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: var(--dark-color, #2C3E50);
    font-weight: 600;
    font-size: 15px;
    border-radius: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-family: "Heebo", Sans-serif;
}

.login-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #FF7A00, #E86800);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.login-menu-link:hover::before {
    opacity: 1;
}

.login-menu-link:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.login-menu-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.login-menu-link:hover .dashicons {
    transform: scale(1.1);
}

/* Highlighted login link */
.sp-login-trigger.login-menu-link {
    background: linear-gradient(135deg, #FF7A00, #E86800);
    color: #fff;
    font-weight: 700;
}

.sp-login-trigger.login-menu-link::before {
    opacity: 0;
}

.sp-login-trigger.login-menu-link:hover {
    background: linear-gradient(135deg, #E86800, #FF7A00);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 122, 0, 0.5);
}

/* Logout link */
.logout-link.login-menu-link {
    background: rgba(229, 57, 53, 0.1);
    color: #E53935;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-link.login-menu-link::before {
    background: #E53935;
}

.logout-link.login-menu-link:hover {
    color: #fff;
}

/* 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: #2C3E50;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.sp-quick-login {
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E5E5;
}

.sp-quick-login h2 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #2C3E50;
}

.social-login-buttons.primary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.social-login-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-login-btn:hover {
    background: #f9f9f9;
    border-color: #FF7A00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.social-login-btn i {
    margin-left: 8px;
    font-size: 18px;
}

.social-login-btn span {
    margin-right: 0;
}

.otp-primary-link {
    margin-bottom: 15px;
}

.otp-primary-link a {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    background: #fff;
    color: #2C3E50;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.otp-primary-link a:hover {
    background: #f9f9f9;
    border-color: #FF7A00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.quick-login-divider {
    margin: 20px 0 0;
    font-size: 14px;
    color: #999;
    position: relative;
}

.quick-login-divider a {
    display: inline-block;
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
    color: #2C3E50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.quick-login-divider a:hover {
    color: #FF7A00;
}

.quick-login-divider span {
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.quick-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E5E5E5;
    z-index: 0;
}

.back-to-quick-login {
    margin-bottom: 15px;
    text-align: right;
}

.back-to-quick-login a {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-quick-login a:hover {
    color: #FF7A00;
}

.back-to-quick-login i {
    margin-left: 5px;
    font-size: 12px;
}

#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: #FF7A00;
}

#sp-login-form button[type="submit"],
#sp-register-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF7A00, #E86800);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 25px 0;
}

#sp-login-form button[type="submit"]:hover,
#sp-register-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #E86800, #FF7A00);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 122, 0, 0.4);
}

.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: #FF7A00;
}

/* Стили для блока регистрации */
.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: #FF7A00;
}

/* Стили для переключения форм */
#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: #FF7A00;
}

/* Стили для заголовков форм */
#sp-login-form h2,
#sp-register-form h2 {
    font-family: "Heebo", Sans-serif;
    color: #2C3E50;
    font-size: 28px;
    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: #FF7A00;
}

/* 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 {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: #ffffff;
    color: #2C3E50;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    overflow: hidden;
}

/* Google button wrapper - let Google SDK control the styling */
.social-login-btn.google-login {
    padding: 0;
    border: none;
    background: transparent;
}

.social-login-btn.google-login > div {
    width: 100% !important;
}

.social-login-btn i {
    margin-right: 10px;
    font-size: 18px;
}

/* Facebook button styling */
.facebook-login {
    padding: 12px;
    background: #fff;
    border: 2px solid #E5E5E5;
}

/* Facebook button hover effect */
.facebook-login:hover {
    background: #f9f9f9;
    border-color: #FF7A00;
    color: #2C3E50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}



/* OTP Forms Styles */
#sp-otp-login-form input,
#sp-otp-verify-form input,
#sp-otp-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-otp-login-form input::placeholder,
#sp-otp-verify-form input::placeholder,
#sp-otp-register-form input::placeholder {
    color: #666;
}

#sp-otp-login-form input:focus,
#sp-otp-verify-form input:focus,
#sp-otp-register-form input:focus {
    outline: none;
    border-color: #FF7A00;
}

#sp-otp-login-form button[type="submit"],
#sp-otp-verify-form button[type="submit"],
#sp-otp-register-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #FF7A00, #E86800);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Heebo", Sans-serif;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 25px 0;
}

#sp-otp-login-form button[type="submit"]:hover,
#sp-otp-verify-form button[type="submit"]:hover,
#sp-otp-register-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #E86800, #FF7A00);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 122, 0, 0.4);
}

#sp-otp-login-form button[type="submit"]:disabled,
#sp-otp-verify-form button[type="submit"]:disabled,
#sp-otp-register-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.otp-message {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

#otp-phone-display {
    font-weight: 600;
    color: #351E18;
    direction: ltr;
    display: inline-block;
}

.otp-login-link {
    text-align: center;
    margin-top: 15px;
}

.otp-login-link a {
    color: #351E18;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.otp-login-link a:hover {
    color: #FF7A00;
}

.resend-otp {
    text-align: center;
    margin-top: 15px;
}

.resend-otp a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.resend-otp a:hover {
    color: #FF7A00;
}

/* OTP Code Input */
#otp_code {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    font-family: monospace;
    direction: ltr;
}

/* Phone Input */
#otp_phone {
    direction: ltr;
    text-align: left;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .sp-popup-content {
        margin: 10% auto;
        padding: 30px 25px;
        width: 95%;
        max-width: 95%;
    }
    
    .sp-popup-content h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .sp-quick-login h2 {
        font-size: 22px;
    }
    
    #sp-login-form h2,
    #sp-register-form h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    /* Stack social buttons vertically on mobile */
    .social-login-buttons.primary {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-login-btn {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
    }
    
    .social-login-btn i {
        font-size: 16px;
    }
    
    /* OTP and other links */
    .otp-primary-link a {
        padding: 10px;
        font-size: 15px;
    }
    
    /* Input fields */
    #sp-login-form input,
    #sp-register-form input,
    #sp-otp-login-form input,
    #sp-otp-verify-form input,
    #sp-otp-register-form input {
        padding: 10px 12px;
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    /* Password toggle */
    #sp-login-form input[type="password"],
    #sp-register-form input[type="password"] {
        padding-left: 32px;
    }
    
    .password-toggle {
        left: 8px;
        font-size: 16px;
    }
    
    /* Submit buttons */
    #sp-login-form button[type="submit"],
    #sp-register-form button[type="submit"],
    #sp-otp-login-form button[type="submit"],
    #sp-otp-verify-form button[type="submit"],
    #sp-otp-register-form button[type="submit"] {
        padding: 12px;
        font-size: 16px;
        margin: 20px 0;
    }
    
    /* Close button larger for easier tapping */
    .sp-close {
        font-size: 28px;
        left: 12px;
        top: 12px;
        padding: 5px;
    }
    
    /* Links and text */
    .forgot-password {
        font-size: 13px;
        bottom: -18px;
    }
    
    .register-link,
    .login-link {
        font-size: 13px;
        margin-top: 15px;
    }
    
    .quick-login-divider {
        font-size: 13px;
    }
    
    .back-to-quick-login a {
        font-size: 13px;
    }
    
    /* OTP specific */
    .otp-message {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    #otp_code {
        font-size: 20px;
        letter-spacing: 6px;
    }
}

@media (max-width: 480px) {
    .sp-popup-content {
        margin: 5% auto;
        padding: 25px 20px;
        width: 96%;
    }
    
    .sp-popup-content h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .sp-quick-login h2 {
        font-size: 20px;
    }
    
    #sp-login-form h2,
    #sp-register-form h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* Smaller padding for mobile */
    .social-login-btn {
        min-height: 42px;
        font-size: 14px;
    }
    
    .otp-primary-link a {
        padding: 9px;
        font-size: 14px;
    }
    
    #sp-login-form input,
    #sp-register-form input,
    #sp-otp-login-form input,
    #sp-otp-verify-form input,
    #sp-otp-register-form input {
        padding: 9px 11px;
        font-size: 14px;
    }
    
    #sp-login-form button[type="submit"],
    #sp-register-form button[type="submit"],
    #sp-otp-login-form button[type="submit"],
    #sp-otp-verify-form button[type="submit"],
    #sp-otp-register-form button[type="submit"] {
        padding: 11px;
        font-size: 15px;
    }
    
    .sp-close {
        font-size: 32px;
    }
}

/* Landscape orientation fixes */
@media (max-width: 900px) and (orientation: landscape) {
    .sp-popup-content {
        margin: 2% auto;
        padding: 20px;
        max-height: 96vh;
        overflow-y: auto;
    }
    
    .sp-popup-content h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .sp-quick-login h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    #sp-login-form h2,
    #sp-register-form h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .social-login-buttons.primary {
        gap: 8px;
    }
    
    #sp-login-form input,
    #sp-register-form input,
    #sp-otp-login-form input,
    #sp-otp-verify-form input,
    #sp-otp-register-form input {
        margin-bottom: 8px;
        padding: 8px 10px;
    }
    
    #sp-login-form button[type="submit"],
    #sp-register-form button[type="submit"],
    #sp-otp-login-form button[type="submit"],
    #sp-otp-verify-form button[type="submit"],
    #sp-otp-register-form button[type="submit"] {
        margin: 12px 0;
        padding: 10px;
    }
} 