/* Login Popup Overlay */
.mwpl-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mwpl-popup-overlay.mwpl-popup-active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Popup Container */
.mwpl-popup-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    margin: 20px auto;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.mwpl-popup-overlay.mwpl-popup-active .mwpl-popup-container {
    transform: translateY(0);
}

/* Popup Content */
.mwpl-popup-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Close Button */
.mwpl-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    color: #333;
}

.mwpl-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.mwpl-popup-close span {
    line-height: 1;
}

/* RTL Support for Close Button */
.mwpl-rtl .mwpl-popup-close {
    right: auto;
    left: 15px;
}

/* Popup Header */
.mwpl-popup-header {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mwpl-popup-header .mwpl-login-logo {
    margin: 0 auto;
}

.mwpl-popup-header .mwpl-login-logo img {
    max-width: 150px;
    height: auto;
    display: inline-block;
}

/* Popup Body */
.mwpl-popup-body {
    padding: 30px;
}

/* Login Form in Popup */
.mwpl-popup-login-form .mwpl-form-wrapper {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.mwpl-popup-login-form .mwpl-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mwpl-popup-login-form .mwpl-input-item label {
    display: flex;
    align-items: center;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.mwpl-popup-login-form .mwpl-input-item label:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px #667eea;
}

.mwpl-popup-login-form .mwpl-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.mwpl-rtl .mwpl-popup-login-form .mwpl-icon {
    margin-right: 0;
    margin-left: 12px;
}

.mwpl-popup-login-form .mwpl-icon img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.mwpl-popup-login-form .mwpl-field {
    flex: 1;
    position: relative;
}

.mwpl-popup-login-form .mwpl-field input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 15px;
    outline: none;
    color: #333;
}

.mwpl-popup-login-form .mwpl-label-value {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s ease;
    color: #999;
    font-size: 15px;
}

.mwpl-rtl .mwpl-popup-login-form .mwpl-label-value {
    left: auto;
    right: 0;
}

.mwpl-popup-login-form .mwpl-field input:focus + .mwpl-label-value,
.mwpl-popup-login-form .mwpl-field input:not(:placeholder-shown) + .mwpl-label-value {
    top: -10px;
    font-size: 12px;
    color: #667eea;
}

/* Password Toggle Icon */
.mwpl-popup-login-form .mwpl-action-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
}

.mwpl-rtl .mwpl-popup-login-form .mwpl-action-icon {
    margin-left: 0;
    margin-right: 10px;
}

.mwpl-popup-login-form .mwpl-action-icon img {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.mwpl-popup-login-form .mwpl-action-icon:hover img {
    opacity: 1;
}

.mwpl-popup-login-form .mwpl-action-icon img[mwpl-action="hide-pass"] {
    display: none;
}

/* Submit Button */
.mwpl-popup-login-form input[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mwpl-popup-login-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mwpl-popup-login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Spinner */
.mwpl-spinner-field {
    position: relative;
}

.mwpl-spinner-wrapper {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mwpl-spinner-field.mwpl-loading .mwpl-spinner-wrapper {
    display: block;
}

.mwpl-spinner-field.mwpl-loading input[type="submit"] {
    opacity: 0.6;
    pointer-events: none;
}

.mwpl-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mwpl-spin 0.8s linear infinite;
}

@keyframes mwpl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notice Messages */
.mwpl-notice-wrapper {
    margin: 10px 0;
}

.mwpl-notice {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.mwpl-notice.mwpl-notice-error {
    display: block;
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.mwpl-notice.mwpl-notice-success {
    display: block;
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

.mwpl-rtl .mwpl-notice {
    border-left: none;
    border-right: 4px solid;
}

/* Register Link */
.mwpl-register-link {
    text-align: center;
    padding: 10px;
}

.mwpl-register-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.mwpl-register-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Reset Password Link */
.mwpl-reset-password-link {
    margin-top: 8px;
}

.mwpl-reset-password-link a {
    color: #667eea;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mwpl-reset-password-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Login Button in Header */
.mwpl-login-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.mwpl-login-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mwpl-login-popup-btn i {
    font-size: 16px;
}

/* User Profile Link */
.mwpl-user-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mwpl-user-profile-link:hover {
    background: #e0e0e0;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mwpl-popup-container {
        width: 95%;
        max-width: 100%;
        margin: 10px;
    }

    .mwpl-popup-header {
        padding: 20px 20px 15px;
    }

    .mwpl-popup-body {
        padding: 20px;
    }

    .mwpl-popup-header .mwpl-login-logo img {
        max-width: 120px;
    }
}

/* Prevent body scroll when popup is open */
body.mwpl-popup-open {
    overflow: hidden;
}
