/* ============================================================
   KBRacking Login Page
   Background image: set on body when images are ready
   Logo image:       set on #LogonLogo when images are ready
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-image: url('../APP_THEMES/KBRacking/images/BGLogon.jpg'); 
    background-color: #9e9d94;
    background-size: cover;
    background-position: center;
}

/* ---- Brand / Logo ---------------------------------------- */

#LogonLogo {
    position: fixed;
    top: 12%;
    left: 0;
    right: 0;
    height: 60px;
    background-image: url('../APP_THEMES/KBRacking/images/solar2-white-final.png'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 10;
    pointer-events: none;
}

/* ---- Login card ------------------------------------------ */

#oDivLogon {
    position: fixed;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    width: 450px;
    background-color: rgba(255, 255, 255, 0.97);
    padding: 22px 24px;
    z-index: 10;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.22);
    border-radius: 5px;
}

/* ---- Language selector ----------------------------------- */

#language_selector {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

#lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.78rem;
    color: #333;
    user-select: none;
}

.lang-flag-active {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border: 1px solid #ccc;
}

.lang-chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    margin-left: 2px;
}

#lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    z-index: 100;
    padding: 8px;
    flex-wrap: wrap;
    gap: 6px;
    width: 178px;
}

#lang-dropdown.open {
    display: flex;
}

.imglang {
    width: 25px;
    height: 15px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #ddd;
}

.imglang:hover {
    border-color: #88d9df;
}

/* ---- Heading --------------------------------------------- */

#logon-heading {
    font-size: 0.93rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 16px;
    line-height: 1.35;
}

/* ---- Form fields ----------------------------------------- */

.logon-field {
    margin-bottom: 20px;
}

.logon-label {
    display: block;
    font-size: 0.73rem;
    color: #555;
    margin-bottom: 5px;
    margin-top: 10px;
}

.logon-field-input {
    position: relative;
}

.logon-field-input input[type="text"],
.logon-field-input input[type="password"],
.logon-field-input input[type="email"] {
    width: 100%;
    border: 1px solid #d0d0d0;
    background-color: #f4f4f2;
    padding: 8px 36px 8px 10px;
    font-size: 0.875rem;
    color: #111;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}

.logon-field-input input:focus {
    border-color: #88d9df;
    background-color: #fff;
}

/* ---- Password toggle ------------------------------------- */

.logon-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1;
    user-select: none;
}

.logon-pw-toggle:hover {
    color: #555;
}

/* ---- Remember me + Forgot password row ------------------- */

#logon-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 18px;
    font-size: 0.77rem;
}

.logon-remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.logon-remember-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #88d9df;
    cursor: pointer;
    flex-shrink: 0;
}

/* ForgotPassword partial renders an <a class="notregisteredlink"> */
#ForgotPasswordContainer {
    background-color: rgba(255, 255, 255, 0.97);
    padding: 22px 24px;
    z-index: 20;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.22);
    border-radius: 5px;
}

.notregisteredlink {
    color: #88d9df;
    text-decoration: none;
    font-size: 0.77rem;
    cursor: pointer;
}

.notregisteredlink:hover {
    text-decoration: underline;
}

/* ---- Submit button --------------------------------------- */

#logon-submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #d7cec4;
    color: #fff;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    border-radius: 0;
    text-transform: uppercase;
}

#logon-submit-btn:hover {
    
}

/* ---- Validation ------------------------------------------ */

.field-validation-error {
    display: block;
    color: #c0392b;
    font-size: 0.70rem;
    margin-bottom: 2px;
}

.validation-summary-errors {
    color: #c0392b;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

/* ---- Cookie alert ---------------------------------------- */

#cookieAlert {
    display: none;
    margin-top: 14px;
    text-align: center;
    color: red;
    font-size: 0.85rem;
}

.cookie-warning-icon {
    width: 45px;
    cursor: pointer;
    padding-top: 5px;
}

/* ---- Browser compatibility error ------------------------- */

#LogonErrorMsgContainer {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: darkgray;
    color: red;
    text-align: center;
    z-index: 9999;
    padding: 50px;
    font-size: 1.25em;
}

.browser-table {
    margin-left: auto;
    margin-right: auto;
}

.browser-table td {
    padding: 15px;
}

.browser-icon {
    width: 100px;
    height: 100px;
    border: 0;
}

/* ---- Noscript -------------------------------------------- */

.noscript-warning {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 200px;
    text-align: center;
    color: red;
    font-size: 150%;
}

.noscript-icon {
    cursor: pointer;
    padding-top: 5px;
    width: 75px;
}

/* ---- Registration link (below submit on login page) ------ */

#logon-register-row {
    margin-top: 12px;
    text-align: center;
}

/* ---- Registration form ----------------------------------- */

#oDivLogon {
    max-height: 92vh;
    overflow-y: auto;
}

.reg-row {
    display: flex;
    gap: 12px;
}

.reg-field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.reg-field--grow {
    flex: 2;
}

.reg-input {
    width: 100%;
    border: 1px solid #d0d0d0;
    background-color: #f4f4f2;
    padding: 8px 10px;
    font-size: 0.875rem;
    color: #111;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}

    .reg-input:focus {
        border-color: #88d9df;
        background-color: #fff;
    }

select.reg-input {
    cursor: pointer;
}

.reg-dsgvo-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #444;
}

span#DSGVOText{
    padding-top: 3px;
}

.reg-dsgvo-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #88d9df;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.dsgvo-error {
    color: red;
}

.reg-error-row {
    display: none;
    color: #c0392b;
    font-size: 0.82rem;
    font-weight: bold;
    margin-bottom: 8px;
}

#reg-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    margin-bottom: 8px;
}

.reg-back-link {
    font-size: 0.78rem;
}

.reg-field .field-validation-error {
    margin-bottom: 2px;
}
