/* Modern Login Page Styles - Arabic RTL Layout */

/* Cairo Font Face Declarations */
@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo/Cairo-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    overflow: auto;
    /* Hide scrollbar but keep scrolling functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    background: #FFFFFF url('/images/bg-green.png') center center;
    background-size: cover;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

/* Right Side - Login Form Section (positioned RIGHT for Arabic) */
.login-form-section {
    flex: 0 0 45%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 10;
}

.login-form-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

/* Left Side - Branding Section */
.login-branding-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 10;
}

.branding-content {
    text-align: center;
    color: white;
    max-width: 500px;
}

.logo-container {
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    filter: brightness(0) saturate(100%) invert(76%) sepia(16%) saturate(714%) hue-rotate(5deg) brightness(93%) contrast(89%);
}



.app-title {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.app-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    opacity: 0.95;
    color: #c9b896;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Login Card */
.login-card {
    background: url('/images/login-box.png') center center;
    background-size: cover;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideInRight 0.6s ease-out;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.login-card > * {
    position: relative;
    z-index: 2;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-card-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
}

.login-card-header h2 {
    color: #2c2c2c;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.login-card-body {
    padding: 1.5rem 2.5rem 2.5rem 2.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 0.6rem;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    border: 2px solid #d8d8d8;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.form-control:focus {
    border-color: #988561;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(152, 133, 97, 0.1);
    background-color: white;
    outline: none;
}

/* ABP Input Fields */
.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"],
.login-card .form-control,
.login-card .abp-input input,
.login-card .abp-input .form-control {
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.form-control::placeholder {
    color: #aaa;
}

/* Remember Me Checkbox */
.form-check {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    cursor: pointer;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #988561;
    border-color: #988561;
}

.form-check-input:focus {
    border-color: #988561;
    box-shadow: 0 0 0 3px rgba(152, 133, 97, 0.15);
}

.form-check-label {
    cursor: pointer;
    color: #666;
    font-size: 0.95rem;
    user-select: none;
}

/* Login Button */
.login-btn,
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    background: linear-gradient(135deg, #b8a078 0%, #988561 100%) !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.login-btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #c9b089 0%, #a99672 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(152, 133, 97, 0.3) !important;
    color: white !important;
}

.login-btn:active,
.btn-primary:active {
    transform: translateY(0);
}

.login-btn:focus,
.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(152, 133, 97, 0.25) !important;
}

.login-btn:disabled,
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Links */
.login-links {
    text-align: right;
    margin-top: 1rem;
}

.forgot-password-link {
    color: #988561;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: #6b5d44;
    text-decoration: underline;
}

/* Validation Messages */
.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.3rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .login-form-section {
        flex: 0 0 50%;
    }
}

@media (max-width: 1024px) {
    .app-title {
        font-size: 1.1rem;
    }
    
    .app-subtitle {
        font-size: 1.5rem;
    }
    
    .login-logo {
        max-width: 150px;
        max-height: 150px;
    }
    
    .login-form-section {
        flex: 0 0 55%;
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column-reverse;
    }
    
    .login-branding-section {
        min-height: 35vh;
        padding: 30px 20px;
        order: 2;
    }
    
    .login-form-section {
        min-height: 65vh;
        flex: 1;
        max-width: 100%;
        padding: 30px 20px;
        order: 1;
    }
    
    .app-title {
        font-size: 1rem;
    }
    
    .app-subtitle {
        font-size: 1.3rem;
    }
    
    .login-logo {
        max-width: 120px;
        max-height: 120px;
    }
    
    .login-card-header h2 {
        font-size: 1.3rem;
    }
    
    .login-card-body {
        padding: 1.5rem;
    }
    
    .language-switcher {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .login-form-wrapper {
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    .login-branding-section {
        padding: 20px 15px;
        min-height: 30vh;
    }
    
    .login-form-section {
        padding: 20px 15px;
    }
    
    .app-title {
        font-size: 0.9rem;
    }
    
    .app-subtitle {
        font-size: 1.1rem;
    }
    
    .login-logo {
        max-width: 100px;
        max-height: 100px;
    }
    
    .login-card-body {
        padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    }
    
    .login-card-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .login-card-header h2 {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .login-btn {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .login-form-wrapper {
        margin-top: 60px;
    }
}

/* Smooth Scrolling for Mobile */
@media (max-width: 768px) {
    .login-container {
        -webkit-overflow-scrolling: touch;
    }
}

/* Print Styles */
@media print {
    .login-container {
        display: none;
    }
}
