/**
 * File: assets/css/login.css
 * @author: Naor Asyag, email: naorasyag@gmail.com
 * @version: 1.0
 *
 * Custom styles for the meOS login portal.
 * This file implements the dark theme, customizes Bootstrap components,
 * and defines animations for a premium user experience.
 */

/* 2.1: CSS Variables for Theming */
:root {
    --dark-bg: #121212;
    --dark-bg-secondary: #1e1e1e;
    --primary-accent: #007bff; /* Electric Blue */
    --primary-accent-glow: rgba(0, 123, 255, 0.35);
    --text-color: #e0e0e0;
    --text-color-muted: #8e8e8e;
    --border-color: #333;
    --form-bg: #2a2a2a;
    --success-color: #28a745;
    --error-color: #dc3545;
}

/* 2.2: Global Styles */
body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Rubik', sans-serif; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2.3: Layout Panels */
.info-panel {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://source.unsplash.com/random/900x1600/?technology,future') no-repeat center center;
    background-size: cover;
    color: white;
}

.info-content {
    max-width: 450px;
}

.form-panel {
    background-color: var(--dark-bg);
}

.form-container {
    width: 100%;
    max-width: 400px;
}

/* 2.4: Typography and Brand Elements */
.logo-text {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    letter-spacing: -2px;
}

.slogan {
    font-size: 1.25rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    direction: rtl;
}

.info-description {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    direction: rtl;
}

/* 2.5: Form Element Customization */
.form-control {
    background-color: var(--form-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus {
    background-color: var(--form-bg);
    color: var(--text-color);
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.25rem var(--primary-accent-glow);
}

.form-control::placeholder {
    color: var(--text-color-muted);
}

/* Override Bootstrap's invalid styles for dark mode */
.form-control.is-invalid, .was-validated .form-control:invalid {
    border-color: var(--error-color);
}
.form-control.is-invalid:focus, .was-validated .form-control:invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.35);
}
.invalid-feedback {
    color: var(--error-color);
}

/* 2.6: Button Customization */
.btn-primary {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
    transform: translateY(-2px);
}

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

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem var(--primary-accent-glow);
}


/* 2.7: Links & Misc */
hr {
    border-color: var(--border-color);
}

a, .form-switch-link {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover, .form-switch-link:hover {
    color: #3395ff;
    text-decoration: underline;
}

/* 2.8: Animations for Form Switching */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-wrapper {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 2.9: Carousel Customization */
.info-panel .carousel {
    width: 100%;
}

.info-panel .carousel-inner {
    /* Ensures the content inside the carousel is also vertically centered */
    display: flex;
    align-items: center;
    min-height: 250px; /* Give it some minimum height */
}

.info-panel .info-content {
    /* Reset margin for better alignment inside the carousel */
    margin: 0 auto;
}

/* Custom styling for carousel indicators */
.carousel-indicators [data-bs-target] {
    background-color: var(--primary-accent);
    opacity: 0.5;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    border-top: 0;
    border-bottom: 0;
    transition: opacity 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
}