/* Modern Admin Login Styles */
body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    font-family: 'IRANYekan', 'IRANSans', Arial, sans-serif !important;
    direction: rtl;
}

/* Apply Iran Yekan font to all login page elements */
body.login *,
body.login input,
body.login textarea,
body.login select,
body.login button,
body.login .button,
body.login h1,
body.login h2,
body.login h3,
body.login h4,
body.login h5,
body.login h6,
body.login p,
body.login label,
body.login a,
body.login .message,
body.login .success,
body.login .error,
body.login .notice {
    font-family: 'IRANYekan', 'IRANSans', Arial, sans-serif !important;
    direction: rtl;
}

/* Fix Dashicons - prevent Iran Yekan font from affecting WordPress icons */
body.login .dashicons,
body.login .dashicons-before:before,
body.login .dashicons-visibility:before,
body.login .dashicons-hidden:before,
body.login [class*="dashicons-"]:before,
body.login [class*="dashicons-"] {
    font-family: 'dashicons' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
}

/* Specific fix for password eye icon - Dashicons */
body.login .dashicons-visibility:before {
    content: "\f177" !important;
    font-family: 'dashicons' !important;
}

body.login .dashicons-hidden:before {
    content: "\f530" !important;
    font-family: 'dashicons' !important;
}

/* Apply Iran Yekan font to registration page elements */
body.login.register *,
body.login.register input,
body.login.register textarea,
body.login.register select,
body.login.register button,
body.login.register .button,
body.login.register h1,
body.login.register h2,
body.login.register h3,
body.login.register h4,
body.login.register h5,
body.login.register h6,
body.login.register p,
body.login.register label,
body.login.register a,
body.login.register .message,
body.login.register .success,
body.login.register .error,
body.login.register .notice {
    font-family: 'IRANYekan', 'IRANSans', Arial, sans-serif !important;
    direction: rtl;
}

/* Fix Dashicons for registration page */
body.login.register .dashicons,
body.login.register .dashicons-before:before,
body.login.register .dashicons-visibility:before,
body.login.register .dashicons-hidden:before,
body.login.register [class*="dashicons-"]:before,
body.login.register [class*="dashicons-"] {
    font-family: 'dashicons' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
}

/* Specific fix for password eye icon in registration page - Dashicons */
body.login.register .dashicons-visibility:before {
    content: "\f177" !important;
    font-family: 'dashicons' !important;
}

body.login.register .dashicons-hidden:before {
    content: "\f530" !important;
    font-family: 'dashicons' !important;
}

/* Dynamic Background Image */
body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.3;
}

#login {
    width: 400px;
    margin: 5% auto;
    padding: 0;
}

.login #nav {
    margin: 20px 0 0;
    border: none;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: transparent;
}

.login form {
    margin-top: 0;
    border-radius: 20px;
    margin-right: 0;
    padding: 40px 35px;
    font-weight: 400;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.login form:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.login h1 {
    display: none;
}

#backtoblog {
    display: none;
}

/* Form Elements */
.login form .input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'IRANYekan', 'IRANSans', Arial, sans-serif;
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-align: right;
}

.login form .input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.login form .button-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'IRANYekan', 'IRANSans', Arial, sans-serif;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login form .button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.login form .button-primary:active {
    transform: translateY(-1px);
}

/* Navigation Links */
.login #nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.login #nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Error Messages */
.login .message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Success Messages */
.login .success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Login Messages */
#login-message p {
    color: white !important;
    font-weight: 500;
    text-align: center;
}

#login-message {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

/* Remember Me */
.login form .forgetmenot {
    margin: 20px 0;
}

.login form .forgetmenot label {
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.login form .forgetmenot input[type="checkbox"] {
    margin-left: 8px;
    transform: scale(1.2);
}

/* Submit Button Container */
.login form .submit {
    margin-top: 30px;
}

/* Responsive Design */
@media only screen and (max-width: 600px) {
    #login {
        width: 90% !important;
        margin: 10% auto;
    }
    
    .login form {
        padding: 30px 25px;
    }
    
    .login form .input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .login form .button-primary {
        padding: 12px 25px;
        font-size: 14px;
    }
}

@media only screen and (max-width: 400px) {
    #login {
        width: 95% !important;
    }
    
    .login form {
        padding: 25px 20px;
    }
}