﻿/* wwwroot/css/login.css */

:root {
    --primary-color: #0d6efd; /* Bootstrap Blue */
    --primary-hover-color: #0b5ed7;
    --secondary-color: #6c757d;
    --light-gray-color: #f0f2f5; /* لون خلفية أخف قليلاً */
    --border-radius: 0.75rem;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light-gray-color);
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden; /* Important for border-radius */
}

.login-header {
    text-align: center;
    padding: 2rem 1rem;
}

    .login-header img {
        max-height: 70px;
        margin-bottom: 1rem;
    }

    .login-header h4 {
        font-weight: 700;
        color: #333;
    }

/* Input Fields with Icons */
.input-group-custom {
    position: relative;
}

    .input-group-custom .form-control {
        padding-left: 2.5rem; /* Space for icon */
    }

html[dir="rtl"] .input-group-custom .form-control {
    padding-left: 0.75rem; /* Reset for RTL */
    padding-right: 2.5rem; /* Space for icon in RTL */
}

.input-group-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--secondary-color);
    pointer-events: none; /* Make icon non-clickable */
}

html[dir="rtl"] .input-group-icon {
    left: auto;
    right: 1rem;
}

/* Password visibility toggle */
.password-toggle-icon {
    left: auto;
    right: 1rem;
    cursor: pointer;
    pointer-events: all;
}

html[dir="rtl"] .password-toggle-icon {
    right: auto;
    left: 1rem;
}

/* Form Styling */
.form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

    .btn-primary:hover {
        background-color: var(--primary-hover-color);
        transform: translateY(-2px);
    }

.form-check-label {
    user-select: none;
}

/* Brand Section (Right Side) - مع الصورة الجديدة */
.login-brand-section {
    flex: 1.2; /* Make it slightly larger */
    background: url('/images/dental-lab-background.png') no-repeat center center; /* استخدم الصورة كخلفية */
    background-size: cover; /* تغطية المساحة بالكامل */
    color: white;
    display: none; /* Hidden on small screens */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    flex-direction: column;
    position: relative; /* لتمكين التراكب الشفاف */
    border-radius: var(--border-radius); /* مطابقة للبطاقة - إذا كنت تريدها مستديرة الزوايا */
}

    /* طبقة تراكب لجعل النص مقروءًا فوق الصورة */
    .login-brand-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5); /* طبقة شفافة سوداء */
        z-index: 1;
        border-radius: var(--border-radius); /* مطابقة للبطاقة */
    }

    .login-brand-section > * { /* لجعل المحتوى فوق التراكب */
        position: relative;
        z-index: 2;
    }

    .login-brand-section img {
        max-width: 150px;
        margin-bottom: 1.5rem;
    }

    .login-brand-section h1 {
        font-weight: 700;
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .login-brand-section p {
        font-size: 1.1rem;
        max-width: 400px;
        opacity: 0.9;
    }

/* Show brand section on medium screens and up */
@media (min-width: 768px) {
    .login-brand-section {
        display: flex;
        border-top-left-radius: var(--border-radius);
        border-bottom-left-radius: var(--border-radius);
        /* للحصول على زوايا مستديرة فقط على الجانب الأيسر إذا كانت البطاقة كلها مستديرة */
        /* إذا كانت البطاقة كلها مستديرة، لا تحتاج إلى هذه الأسطر، فقط ضع border-radius على login-card */
        /* أو يمكنك ضبطها لتناسب تصميمك */
    }

    html[dir="rtl"] .login-brand-section {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: var(--border-radius);
        border-bottom-right-radius: var(--border-radius);
    }
}
