﻿/* Style for login screen */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Roboto', 'Poppins', Arial, sans-serif;
    background-color: #f3f4f6;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    position: relative;
    top: -50px;
}

    .login-box h2 {
        margin-bottom: 1.5rem;
        font-weight: bold;
        color: #333333;
    }

.form-control {
    border-radius: 0.375rem;
}

.btn-primary {
    width: 100%;
    font-weight: bold;
}

.form-text {
    text-align: center;
}

/* Override height for select elements */
select.form-control:not([size]):not([multiple]) {
    height: calc(2.25rem + 2px);
}

    /* Set grey color for select options */
    select.form-control:not([size]):not([multiple]) option {
        color: grey;
    }

/* Custom arrow for select elements */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z" fill="gray"/></svg>') no-repeat right 0.75rem center/1.5rem 1.5rem;
    padding-right: 2.5rem;
}

/* Modern Remember Me checkbox styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    user-select: none;
    padding-left: 0;
}

/* Hide native checkbox but keep it accessible */
.form-check-input {
    position: absolute;
    opacity: 0;
    width: 1rem;
    height: 1rem;
    margin: -20px;
}

    /* Custom box */
    .form-check-label {
        position: relative;
        padding-left: 2rem; /* space for custom control */
        cursor: pointer;
    }

.form-check-input + .form-check-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 6px;
    background: #ffffff;
    border: 2px solid #d1d5db; /* neutral-300 */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.02);
    transition: all 150ms ease;
}

/* Check mark */
.form-check-input:checked + .form-check-label::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 10px;
    border-right: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-color: #ffffff;
    box-shadow: none;
}

/* Use a primary background for checked state and draw checkmark with pseudo element */
.form-check-input:checked + .form-check-label::before {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); /* blue-600 */
    border-color: #1d4ed8;
}

.form-check-input:checked + .form-check-label::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 12px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

/* Focus state for accessibility */
.form-check-input:focus + .form-check-label::before {
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
    border-color: #2563eb;
}

/* Smaller devices adjustments */
@media (max-width: 480px) {
    .form-check-input + .form-check-label {
        padding-left: 2rem;
        font-size: 0.95rem;
    }
    .form-check-input + .form-check-label::before {
        width: 1.2rem;
        height: 1.2rem;
        border-radius: 4px;
    }
}