/* Custom Login Page Styles for Altahwel Theme */

body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
}

body.login div#login {
    width: 400px;
    padding: 8% 0 0;
    margin: auto;
}

body.login div#login h1 {
    text-align: center;
    margin-bottom: 30px;
}

body.login div#login h1 a {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    display: block;
    text-decoration: none;
    color: white;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.3s ease;
}

body.login div#login h1 a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

body.login div#login h1 a:before {
    content: "💰";
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

body.login form#loginform,
body.login form#registerform,
body.login form#lostpasswordform {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

body.login form .input,
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

body.login form p label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    text-align: right;
}

body.login form p.forgetmenot {
    text-align: right;
    margin-bottom: 20px;
}

body.login form p.forgetmenot input[type="checkbox"] {
    margin-left: 8px;
}

body.login form p.submit {
    text-align: center;
    margin-bottom: 0;
}

body.login form p.submit .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

body.login form p.submit .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

body.login form p.submit .button-primary:active {
    transform: translateY(0);
}

body.login #nav,
body.login #backtoblog {
    text-align: center;
    margin: 15px 0;
}

body.login #nav a,
body.login #backtoblog a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

body.login .message,
body.login .notice {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #374151;
    text-align: right;
    direction: rtl;
}

body.login .message.success,
body.login .notice.notice-success {
    border-left: 4px solid #10b981;
}

body.login .message.error,
body.login .notice.notice-error {
    border-left: 4px solid #ef4444;
}

body.login .message.info,
body.login .notice.notice-info {
    border-left: 4px solid #3b82f6;
}

/* Loading animation */
body.login .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Responsive design */
@media screen and (max-width: 480px) {
    body.login div#login {
        width: 90%;
        padding: 5% 0 0;
    }
    
    body.login form#loginform,
    body.login form#registerform,
    body.login form#lostpasswordform {
        padding: 20px;
    }
    
    body.login div#login h1 a {
        padding: 15px;
        font-size: 20px;
    }
    
    body.login div#login h1 a:before {
        font-size: 36px;
    }
}

/* RTL specific adjustments */
body.login.rtl form .input,
body.login.rtl input[type="text"],
body.login.rtl input[type="password"],
body.login.rtl input[type="email"] {
    text-align: right;
}

body.login.rtl form p label {
    text-align: right;
}

body.login.rtl .message,
body.login.rtl .notice {
    text-align: right;
}

/* Custom branding */
body.login:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Footer branding */
body.login:after {
    content: "© 2024 عبد الله الصارم للتحويل - جميع الحقوق محفوظة";
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    z-index: 1000;
}
