/* Login page - mirrors the layout of https://account.limesurvey.org/login */

:root {
    --ls-primary: #14ae5c;
    --ls-primary-hover: #108c4a;
    --ls-secondary: #003e24;
    --ls-text: #1e1e1e;
    --ls-muted: #9094a7;
    --ls-light: #eeeff7;
    --ls-focus-shadow: rgba(66, 0, 255, 0.2);
    --ls-danger: #f0506e;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body.ls-login {
    background: #fff;
    color: var(--ls-text);
    font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.017em;
}

.ls-login a {
    color: var(--ls-primary);
    text-decoration: none;
}

.ls-login a:hover,
.ls-login a:focus {
    text-decoration: underline;
}

.ls-login .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Layout */
.ls-login-layout {
    display: flex;
    min-height: 100vh;
}

/* Comes after the form in the markup, but is shown first */
.ls-login-sidebar {
    order: -1;
    position: sticky;
    top: 0;
    flex: 0 0 33.333%;
    max-width: 33.333%;
    height: 100vh;
    padding: 60px 0;
    overflow: hidden;
    background: var(--ls-secondary);
}

.ls-login-sidebar .logo {
    position: relative;
    z-index: 2;
    text-align: center;
}

.ls-login-sidebar .logo a,
.ls-login-sidebar .logo img {
    display: inline-block;
}

.ls-login-sidebar .box-pattern {
    position: absolute;
    right: -3px;
    bottom: 16%;
}

.ls-login-sidebar .box-pattern img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ls-login-sidebar .decor-2 {
    position: absolute;
    bottom: 30%;
    left: 10%;
}

.ls-login-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 40px 109px;
}

.ls-login-form {
    width: 100%;
    max-width: 486px;
}

/* Heading */
.ls-login-form h1 {
    margin: 0 0 18px;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.017em;
}

.ls-login-form .lead {
    margin: 0 0 32px;
    font-size: 18px;
}

/* Error message */
.ls-login-alert {
    margin: 0 0 24px;
    padding: 14px 16px;
    border-left: 4px solid var(--ls-danger);
    border-radius: 4px;
    background: #fdeef1;
    font-size: 15px;
    line-height: 1.4;
}

.ls-login-alert strong {
    display: block;
    margin-bottom: 2px;
}

/* Form controls */
.ls-login-form .control-group {
    position: relative;
    margin-bottom: 24px;
}

.ls-login-form .form-control {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 2px solid var(--ls-text);
    border-radius: 4px;
    background: #fff;
    box-shadow: 8px 8px 0 0 var(--ls-light);
    color: #252525;
    font-family: inherit;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: normal;
    transition: box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
}

.ls-login-form .form-control::placeholder {
    color: var(--ls-muted);
    opacity: 1;
}

.ls-login-form .form-control:focus {
    outline: 1px solid var(--ls-text);
    box-shadow: 8px 8px 0 0 var(--ls-focus-shadow);
}

.ls-login-form .form-control[readonly] {
    background: var(--ls-light);
}

.ls-login-form .form-text {
    display: block;
    color: var(--ls-muted);
    font-size: 12px;
    line-height: 15px;
}

/* Password field with show/hide toggle */
.ls-login-form .password-group {
    position: relative;
}

.ls-login-form .password-group .form-control {
    padding-right: 48px;
}

.ls-login-form .password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7c8191;
    cursor: pointer;
}

.ls-login-form .password-toggle:focus-visible {
    outline: 2px solid var(--ls-primary);
    outline-offset: -6px;
}

.ls-login-form .password-toggle svg {
    width: 18px;
    height: 18px;
}

.ls-login-form .password-toggle .icon-hide,
.ls-login-form .password-toggle.is-visible .icon-show {
    display: none;
}

.ls-login-form .password-toggle.is-visible .icon-hide {
    display: block;
}

/* Checkboxes */
.ls-login-form .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.ls-login-form .form-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0 8px 0 0;
    accent-color: var(--ls-primary);
}

.ls-login-form .form-check label {
    font-size: 16px;
    line-height: 24px;
}

/* Submit */
.ls-login-form .btn-primary {
    display: inline-block;
    margin: 0 0 24px;
    padding: 11.2px 46px;
    border: 1px solid var(--ls-primary);
    border-radius: 4px;
    background: var(--ls-primary);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.ls-login-form .btn-primary:hover {
    border-color: var(--ls-primary-hover);
    background: var(--ls-primary-hover);
}

.ls-login-form .btn-primary:focus-visible {
    outline: 2px solid var(--ls-text);
    outline-offset: 2px;
}

.ls-login-form .btn-primary[disabled] {
    opacity: 0.7;
    cursor: default;
}

.ls-login-form .links a {
    margin-right: 8px;
}

.ls-login-form .btn-secondary {
    display: inline-block;
    margin: 0 0 24px;
    padding: 11.2px 46px;
    border: 2px solid var(--ls-text);
    border-radius: 4px;
    background: #fff;
    color: var(--ls-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.ls-login-form .btn-secondary:hover {
    background: var(--ls-light);
}

.ls-login-form .btn-secondary:focus-visible {
    outline: 2px solid var(--ls-text);
    outline-offset: 2px;
}

/* Consent page */
.ls-login-form h1.h1-small {
    font-size: 36px;
}

.ls-login-form p {
    margin: 0 0 16px;
    line-height: 1.4;
}

.ls-login-form .lead {
    line-height: 1.25;
}

.ls-login-form .consent-attributes {
    margin: 0 0 24px;
    padding: 4px 20px;
    border: 2px solid var(--ls-text);
    border-radius: 4px;
    box-shadow: 8px 8px 0 0 var(--ls-light);
}

.ls-login-form .consent-attributes table {
    width: 100%;
    border-collapse: collapse;
}

.ls-login-form .consent-attributes caption {
    padding: 12px 0 4px;
    color: var(--ls-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.ls-login-form .consent-attributes td {
    padding: 12px 0;
    border-bottom: 1px solid var(--ls-light);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.ls-login-form .consent-attributes tr:last-child > td {
    border-bottom: 0;
}

.ls-login-form .consent-attributes td:first-child {
    width: 35%;
    padding-right: 16px;
}

.ls-login-form .consent-attributes .attrname {
    display: inline-block;
    color: #7c8191;
    font-size: 14px;
}

.ls-login-form .consent-attributes .attrname::first-letter {
    text-transform: uppercase;
}

.ls-login-form .consent-attributes ul {
    margin: 0;
    padding-left: 18px;
}

.ls-login-form .consent-attributes img {
    max-width: 100%;
    height: auto;
}

.ls-login-form .consent-attributes .attrvalue.hidden {
    display: none;
}

.ls-login-form .consent-privacy {
    font-size: 14px;
}

.ls-login-form .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ls-login-form .button-row button {
    margin-bottom: 0;
}

/* Responsive - same breakpoints as the account site */
@media (max-width: 1399.98px) {
    .ls-login-main {
        padding: 40px 80px;
    }
}

@media (max-width: 1199.98px) {
    .ls-login-layout {
        flex-direction: column;
    }

    .ls-login-sidebar {
        position: relative;
        flex: 0 0 auto;
        max-width: none;
        height: auto;
        padding: 30px 0;
    }

    .ls-login-sidebar .box-pattern .decor-1 img {
        max-width: 80px;
    }

    .ls-login-main {
        flex: 1 0 auto;
    }

    .ls-login-form {
        margin: 0 auto;
    }

    .ls-login-form .lead {
        margin-bottom: 20px;
    }
}

@media (max-width: 991.98px) {
    .ls-login-main {
        padding: 50px;
    }

    .ls-login-form h1,
    .ls-login-form h1.h1-small {
        font-size: 35px;
    }
}

@media (max-width: 767.98px) {
    .ls-login-sidebar {
        padding: 20px 0;
    }

    .ls-login-sidebar .logo img {
        max-width: 120px;
        height: auto;
    }
}

@media (max-width: 575.98px) {
    .ls-login-main {
        padding: 30px 16px;
    }

    .ls-login-form h1,
    .ls-login-form h1.h1-small {
        font-size: 24px;
    }

    .ls-login-form .button-row button {
        flex: 1 1 100%;
    }
}
