:root {
    --magenta-color: #d23369;
    --bs-body-font-size: 1.6rem;
    --bs-link-color: var(--bs-body-color);
    --bs-link-hover-color: #6d6d6d;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    font-size: 10px;
}

body {
    font-family: Montserrat, var(--bs-font-sans-serif);
}

h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
    font-weight: 600;
}

.btn {
    --bs-btn-font-size: 1.6rem;
}

main > .container {
    padding: 7rem 1.5rem 2rem;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 6rem;
}

.footer > .container {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 0.3rem;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 0.5rem transparent;
    margin: 0.4rem 0.4rem 0.2rem 0.4rem;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 0.7rem #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 0.7rem #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 5rem;
}

.hint-block {
    display: block;
    margin-top: 0.5rem;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 0.3rem solid #eed3d7;
    padding: 1rem 2rem;
    margin: 0 0 1.5rem 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 76.7rem) {
    .nav li > form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 1rem 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

#map {
    position: fixed;
    inset: 0;
}

#content-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.667); /* semi-transparent white */
    z-index: 1000; /* above map */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: scroll;
}

#content-overlay .content-inner {
    display: flex;
    justify-content: center;
    padding: 4.8rem 0;
    overflow: unset;
    position: relative;
}

#content-overlay footer {
    flex-direction: column;
    padding: 2.4rem 0;
    font-size: 1.2rem;
    font-weight: 400;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
}

#auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
    margin: 0;
    width: 100%;
    overflow: unset;
}

#auth-container .auth-content .auth-content-inner {
    box-shadow: 0 0.2rem 0.6rem 0 #1018280D;
    border-radius: 1.6rem;
    border: 0.1rem solid #00000014;
    position: relative;
    margin: 0;
    padding: 0 0 1.6rem 0;
    outline: 0;
    vertical-align: baseline;
    background: white;
}

#auth-container .auth-content .auth-content-inner hr {
    color: #00000014;
    margin: 1.6rem 0;
    opacity: 1;
}

#auth-container .auth-content .auth-content-inner .aci-header {
    padding: 2rem 2.4rem;
    position: relative;
}

#auth-container .auth-content .auth-content-inner .aci-header h3 {
    margin-bottom: 0;
}

#auth-container .auth-content .auth-content-inner .aci-body {
    border-top: 0.1rem solid #00000014;
    padding: 0 2.4rem;
    padding-top: 1.6rem;
}

#auth-container .auth-content .auth-content-footer .sign-up {
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: 2.4rem;
    text-align: center;
}

ul.social-login-buttons {
    list-style-type: none;
    padding-inline-start: 0;
    padding-left: 0;
}

.btn-social {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #00000026;
    --bs-btn-hover-color: var(--bs-btn-color);
    --bs-btn-hover-bg: #fbfbfb;
    --bs-btn-hover-border-color: var(--bs-btn-border-color);
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: var(--bs-btn-color);;
    --bs-btn-active-bg: #f9f9f9;
    --bs-btn-active-border-color: var(--bs-btn-border-color);;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-btn-color);
    --bs-btn-disabled-bg: #e6e6e6;
    --bs-btn-disabled-border-color: var(--bs-btn-border-color);
    --bs-btn-padding-x: 4rem;
    --bs-btn-padding-y: 0;
    background-position-x: 1.2rem;
    background-position-y: center;
    background-size: 2.4rem;
    background-repeat: no-repeat;
    width: 100%;
    margin-bottom: 1.6rem;
    height: 5rem;
    border-radius: 0.8rem;
    box-sizing: border-box;
    display: block;
    font-size: 1.4rem;
    line-height: 5rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-bottom: 1.6rem;
    border: 0.05rem solid #00000026;
    margin-top: 0;
}

.btn-social.btn-google {
    background-image: url(../images/login/google.png);
}

.btn-social.btn-live {
    background-image: url(../images/login/live.png);
}

#auth-container {
    .form-label {
        font-weight: 600;
    }

    .form-control {
        font-size: 1.4rem;
        line-height: 2.4rem;
        padding: 1.3rem 1.6rem;
    }

    .login-button {
        --bs-btn-line-height: 4.15rem;
        width: 100%;
        margin-bottom: 1rem;
    }

    .btn-outline-secondary {
        --bs-btn-color: #6c757d;
        --bs-btn-bg: #ffffff;
        --bs-btn-border-color: #00000026;
        --bs-btn-hover-color: var(--bs-btn-color);
        --bs-btn-hover-bg: #fbfbfb;
        --bs-btn-hover-border-color: var(--bs-btn-border-color);
        --bs-btn-focus-shadow-rgb: 49, 132, 253;
        --bs-btn-active-color: var(--bs-btn-color);;
        --bs-btn-active-bg: #f9f9f9;
        --bs-btn-active-border-color: var(--bs-btn-border-color);;
        --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
        --bs-btn-disabled-color: var(--bs-btn-color);
        --bs-btn-disabled-bg: #e6e6e6;
        --bs-btn-disabled-border-color: var(--bs-btn-border-color);
    }
}

#auth-container .or-divider {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin: 1.6rem 0;
}

#auth-container .or-divider hr {
    flex: 1;
    border: none;
    border-top: 0.1rem solid #00000014;
    margin: 0;
    opacity: 1;
}

#auth-container .or-divider span {
    font-size: 1.6rem;
    font-weight: 500;
    color: #6d6d6d;
    white-space: nowrap;
}

/* --- Sliding sections (instead of display:none) --- */

/* Social area: visible by default, collapses when .password */
#auth-container .aci-body .social-login {
    overflow: hidden;
    max-height: 30rem; /* large enough to fit the social block */
    opacity: 1;
    transform: translateY(0);
    transition: max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
}

#auth-container .aci-body.password .social-login {
    max-height: 0;
    opacity: 0;
    transform: translateY(-0.6rem);
}

/* Password field: collapsed by default, expands when .password */
#auth-container .aci-body .field-loginform-password {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-0.6rem);
    transition: max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
}

#auth-container .aci-body.password .field-loginform-password {
    max-height: 12rem; /* large enough to fit label+input+errors */
    opacity: 1;
    transform: translateY(0);
}

/* Footer buttons row: collapsed by default, expands when .password */
#auth-container .aci-body .aci-body-footer-buttons {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(0.6rem);
    transition: max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
}

#auth-container .aci-body.password .aci-body-footer-buttons {
    max-height: 12rem; /* large enough to fit hr + 2 buttons */
    opacity: 1;
    transform: translateY(0);
}

/* --- Keep Sign in buttons swapping instantly --- */
#auth-container .aci-body #continue-btn {
    display: block;
}

#auth-container .aci-body.password #continue-btn {
    display: none;
}

#auth-container .aci-body #login-btn {
    display: none;
}

#auth-container .aci-body.password #login-btn {
    display: block;
}


#auth-container .auth-content .auth-content-inner .aci-body .aci-body-footer-buttons hr {
    width: 100%;
}

#auth-container .auth-content .auth-content-inner .aci-body .aci-body-footer-buttons {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
}

@media (prefers-reduced-motion: reduce) {
    #auth-container .aci-body .social-login,
    #auth-container .aci-body .field-loginform-password,
    #auth-container .aci-body .aci-body-footer-buttons {
        transition: none;
    }
}