/* Leobit Identity - auth pages (login, logout, error, user-mapping, ...) */

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

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-family: 'Source Sans Pro', Arial, sans-serif;
    --font-bold: 'Futura Extra Black', 'Source Sans Pro', Arial, sans-serif;
    --leobit-green: #24b400;
    --leobit-green-hover: #1c9000;
    --text-dark: #333;
    --text-muted: #666;
    --bs-red: #dc3545;
}

.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--text-dark);
    background: #000;
    -webkit-font-smoothing: antialiased;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after {
    box-sizing: border-box;
}

/* Full-screen dark backdrop + lion, fixed behind the scrollable content */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(304.38deg, #000 11.74%, #323232 84.36%);
}

.auth-lion {
    position: fixed;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100vh;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.auth-lion img {
    width: 100%;
    height: auto;
}

/* Scrollable, flex-centered content layer */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.auth-title {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 28px;
    color: var(--text-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.leobit-logo {
    display: flex;
    align-items: center;
}

.leobit-logo img {
    display: block;
}

.extra-bold {
    font-family: var(--font-bold);
    text-transform: uppercase;
}

/* Text content */
.auth-modal h1 {
    font-family: var(--font-bold);
    text-transform: uppercase;
    font-size: 24px;
    color: var(--text-dark);
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}

.auth-modal h1 small {
    display: block;
    text-transform: none;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

.page-header {
    margin: 0 0 16px;
    padding: 0;
    border: none;
}

.auth-modal h3 {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 18px;
    color: var(--text-dark);
    margin: 0 0 16px;
}

/* Trim trailing margins so card padding stays even */
.auth-modal > *:last-child {
    margin-bottom: 0;
}

.auth-modal form .form-group:last-child {
    margin-bottom: 0;
}

.auth-subtitle,
.auth-modal p {
    font-family: var(--font-family);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.auth-modal a:not(.submit-button):not(.sso-button) {
    color: var(--leobit-green);
    text-decoration: underline;
    font-weight: 600;
}

.auth-modal a:not(.submit-button):not(.sso-button):hover {
    color: var(--leobit-green-hover);
}

.request-id {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Buttons */
.submit-button,
.sso-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--leobit-green);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.submit-button:hover,
.sso-button:hover {
    background: var(--leobit-green-hover);
    color: #fff;
    transform: translateY(-1px);
}

.submit-button:active,
.sso-button:active {
    transform: translateY(1px);
}

.submit-button:focus,
.sso-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2em rgba(36, 180, 0, 0.35);
}

.sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.sso-button {
    width: 100%;
}

.sso-button-icon {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 2px;
    padding: 2px;
    object-fit: contain;
}

.w-100 {
    width: 100%;
}

/* Forms (user-mapping page inputs / dropdown) */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 20px;
    color: var(--text-dark);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--leobit-green);
    box-shadow: 0 0 0 2px rgba(36, 180, 0, 0.15);
    outline: none;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-addon {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-left: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    background: #f7f7f7;
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    border-left: 4px solid transparent;
}

.alert strong {
    display: inline-block;
    margin-right: 4px;
}

.alert-success {
    background: rgba(36, 180, 0, 0.1);
    border-left-color: var(--leobit-green);
    color: var(--text-dark);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--bs-red);
    color: var(--text-dark);
}

.alert-warning {
    background: rgba(224, 168, 0, 0.12);
    border-left-color: #e0a800;
    color: var(--text-dark);
}

/* Hide the signout iframe */
.signout {
    display: none;
    width: 0;
    height: 0;
    border: 0;
}

/* Responsive: lion fills the upper area and tucks under the card (no band/cut);
   card pinned near the bottom with a gap */
@media (max-width: 768px) {
    .auth-lion {
        top: 0;
        left: 0;
        width: 100%;
        height: 68vh;
        align-items: flex-end;
        justify-content: center;
        overflow: hidden;
    }

    .auth-lion img {
        width: 116%;
        height: auto;
        max-width: 500px;
        min-width: 360px;
    }

    .auth-container {
        justify-content: flex-end;
        padding: 24px 16px 36px;
    }

    .auth-modal {
        padding: 24px 20px;
    }
}
