/**
 * Login page — centred card (theme_custom).
 * Opacity and primary button colours are reinforced via layout/login.php inline CSS.
 */

body.pagelayout-login #page {
    background-color: transparent !important;
}

.theme-custom-login-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.theme-custom-login-wrapper #page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.custom-login-layout--simple {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1rem;
}

.custom-login-layout__main {
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
}

.custom-login-container {
    padding: 2rem 1.75rem;
    overflow: visible;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(63, 68, 78, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.custom-loginform__brand {
    width: 100%;
    height: 60px;
}

.custom-loginform__logo {
    display: block;
    width: 100%;
    height: 60px;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.custom-loginform__title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #3f444e;
}

.custom-loginform__submit,
body.pagelayout-login .btn-primary:not(.login-cookiesnotice__btn) {
    background-color: var(--bs-primary, #2563eb) !important;
    border-color: var(--bs-primary, #2563eb) !important;
    color: #fff !important;
}

.custom-loginform__submit:hover,
.custom-loginform__submit:focus,
body.pagelayout-login .btn-primary:not(.login-cookiesnotice__btn):hover,
body.pagelayout-login .btn-primary:not(.login-cookiesnotice__btn):focus {
    background-color: color-mix(in srgb, var(--bs-primary, #2563eb) 88%, #000) !important;
    border-color: color-mix(in srgb, var(--bs-primary, #2563eb) 88%, #000) !important;
    color: #fff !important;
}

.custom-loginform .form-control:focus {
    border-color: var(--bs-primary, #2563eb) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bs-primary, #2563eb) 28%, transparent) !important;
}

.custom-loginform .login-languagemenu {
    position: relative;
    z-index: 3;
}

.custom-loginform__extras {
    overflow: visible;
    width: 100%;
}

.custom-loginform__extras-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.custom-loginform__extras-cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}

.custom-loginform__extras-cell--lang .login-languagemenu,
.custom-loginform__extras-cell--lang .custom-login-lang,
.custom-loginform__extras-cell--lang .custom-login-lang .dropdown {
    width: 100%;
}

.custom-loginform__extras-divider {
    flex: 0 0 1px;
    align-self: center;
    width: 1px;
    height: 1.35rem;
    margin: 0 0.65rem;
    background-color: rgba(63, 68, 78, 0.18);
    border: 0;
}

.custom-loginform__footer-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    min-height: 2.1rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(63, 68, 78, 0.14);
    border-radius: 0.5rem;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(63, 68, 78, 0.05);
    color: #3f444e;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.custom-loginform__footer-pill:hover,
.custom-loginform__footer-pill:focus,
.custom-loginform__footer-pill:focus-visible,
.custom-loginform__footer-pill.show {
    color: #3f444e;
    background: rgba(63, 68, 78, 0.09);
    border-color: rgba(63, 68, 78, 0.22);
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

.custom-loginform__footer-pill-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: 100%;
    min-width: 0;
}

.custom-loginform__footer-pill-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-loginform__footer-icon {
    flex-shrink: 0;
    font-size: 0.7rem;
    opacity: 0.72;
}

.custom-login-lang__toggle {
    cursor: pointer;
}

.custom-login-lang__flag {
    font-size: 0.875rem;
    line-height: 1;
    flex-shrink: 0;
}

.custom-login-lang__label {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}

.custom-login-lang__caret {
    flex-shrink: 0;
    width: 0.35rem;
    height: 0.35rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-135deg);
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.dropdown.show .custom-login-lang__caret {
    transform: rotate(45deg);
}

.login-cookiesnotice__btn {
    margin: 0;
    font-family: inherit;
}

.custom-loginform__extras .login-cookiesnotice__btn.btn,
.custom-loginform__extras .login-cookiesnotice__btn {
    border: 1px solid rgba(63, 68, 78, 0.14) !important;
    background: rgba(63, 68, 78, 0.05) !important;
    color: #3f444e !important;
    box-shadow: none !important;
}

.custom-login-lang__menu {
    z-index: 2000;
    min-width: 12rem;
    max-height: 16rem;
    overflow-y: auto;
    margin-bottom: 0.4rem !important;
    padding: 0.35rem;
    border: 1px solid rgba(63, 68, 78, 0.1);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(63, 68, 78, 0.16);
}

.custom-login-lang__option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    font-size: 0.875rem;
    color: #3f444e;
    white-space: nowrap;
}

.custom-login-lang__option:hover,
.custom-login-lang__option:focus {
    background: rgba(63, 68, 78, 0.05);
    color: #3f444e;
}

.custom-login-lang__option.is-active {
    background: color-mix(in srgb, var(--bs-primary, #2563eb) 10%, #fff);
    color: var(--bs-primary, #2563eb);
    font-weight: 600;
}

.custom-login-lang__option.is-active:hover,
.custom-login-lang__option.is-active:focus {
    background: color-mix(in srgb, var(--bs-primary, #2563eb) 14%, #fff);
    color: var(--bs-primary, #2563eb);
}

.custom-login-lang__option-leading {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.custom-login-lang__option-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boost adds a ::before check for [aria-current]; login menu uses highlight only. */
.custom-login-lang__option[aria-current="true"]::before,
.custom-login-lang__option[aria-selected="true"]::before {
    content: none !important;
    display: none !important;
}
