@import url('./colors.css');

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--base-background);
    color: var(--auth-text);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    overflow: hidden;
}

.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full viewport height */
    width: 100%; /* Full width */
    position: relative; /* Ensure positioning for child elements */
    box-sizing: border-box;
    padding: 20px; /* Optional padding for responsiveness */
}

.auth-card {
    background: var(--auth-card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--auth-card-border);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: background-color 0.3s, border-color 0.3s;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: right;
}

label {
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid var(--auth-card-border);
    border-radius: 5px;
    box-sizing: border-box;
    background-color: var(--auth-card-bg);
    color: var(--auth-text);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-button-bg);
}

.form-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: var(--ui-btn-bg);
    color: var(--ui-btn-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.form-button:hover {
    background-color: var(--ui-btn-bg-hover);
}

p {
    font-size: 14px;
    margin-top: 15px;
}

a {
    color: var(--auth-link);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--auth-link-hover);
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    color: var(--auth-error);
    font-size: 14px;
}

.flash-messages {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: center;
}

.flash-messages .success {
    color: var(--auth-success);
}

.flash-messages .danger {
    color: var(--auth-error);
}

.logo {
    position: absolute;
    top: 8%; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Adjust to control the logo's size */
    max-width: 400px; /* Maximum width for the logo */
    height: auto;
    z-index: 0;
}

.logo svg {
    width: 100%;
    height: auto;
    fill: var(--logo-color);
}

/* Separator Styles */
.separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.separator span {
    background-color: var(--auth-card-bg);
    color: var(--auth-text);
    padding: 0 10px;
    font-size: 14px;
    z-index: 1;
}

.separator:before,
.separator:after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--auth-card-border);
    margin: 0 10px;
    z-index: 0;
}

/* OIDC Button Styles */
.alternative-login .form-button {
    width: 100%;
    margin-top: 10px;
    text-align: center;
}

/* ============================= */
/* ===== Mobile (Max 768px) ===== */
/* ============================= */
@media (max-width: 768px) {

    body {
        /* Optional: Adjust overflow if needed for smaller devices */
        overflow-y: auto;
    }

    .auth-container {
        padding: 10px;
        height: auto;
        min-height: 90vh;
    }

    .auth-card {
        padding: 20px;
        margin-top: 0px; /* Ensure some spacing from the top (logo area) */
        max-width: 90%;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    label {
        font-size: 13px;
    }

    .form-input {
        padding: 8px;
        font-size: 13px;
    }

    .form-button {
        padding: 10px;
        font-size: 15px;
    }

    p {
        font-size: 13px;
        margin-top: 10px;
    }

    .logo {
        top: 5%;
        max-width: 300px;
    }
}
