/* Login, forgot-password and reset-password pages. Mirrors the Fangstr app's login, forgot-password and
   reset-password pages so the hand-over from app to Identity is seamless. Theme comes from the `theme`
   parameter on the authorize request, set as a class on <html> by the layout. */

html.theme-night {
    --fangstr-primary: var(--fangstr-blue-900);
    --fangstr-medium: var(--fangstr-gray-400);
    --fangstr-border: var(--fangstr-gray-700);
    --fangstr-text: var(--fangstr-white);
    --fangstr-input-background: transparent;
    --fangstr-attention: var(--fangstr-bright-blue-400);
    --fangstr-attention-contrast: var(--fangstr-blue-800);
    --fangstr-attention-light: var(--fangstr-bright-blue-300);
    --fangstr-attention-dark: var(--fangstr-bright-blue-500);
    --fangstr-link: var(--fangstr-purple-500);
}

.account {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: var(--fangstr-text);
}

.account__image {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("./../images/bg.webp") center/cover no-repeat;
}

.account__content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2.5rem;
    background-color: var(--fangstr-primary);
}

.account__inner {
    width: 100%;
    max-width: 30rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.account__logo {
    width: clamp(11rem, 50%, 15rem);
}

.account__heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.account__heading h1 {
    margin: 0;
    font-family: var(--fangstr-font-600);
    font-size: 1.5rem;
}

.account__icon {
    width: 1.5rem;
    height: 1.5rem;
}

.account__info {
    margin: 0;
    padding: 0 0.125rem;
    line-height: 1.5;
}

.account__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account__form label {
    color: var(--fangstr-medium);
}

.account__password {
    gap: 0.25rem;
}

.account__password .account__link--small {
    align-self: flex-end;
}

/* Primary, secondary and tertiary follow the app's fangstr-button component. */
.account__button,
.account__button--secondary,
.account__button--tertiary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: var(--fangstr-space-2);
    font-family: var(--fangstr-font-600);
    font-size: var(--fangstr-font-size);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    text-decoration: none;
}

.account__button {
    width: 100%;
    margin: 1rem 0 0 0;
    padding: var(--fangstr-space-3) var(--fangstr-space-6);
    background-color: var(--fangstr-attention);
    border: 2px solid var(--fangstr-attention);
    color: var(--fangstr-attention-contrast);
}

.account__button:hover {
    background-color: var(--fangstr-attention-light);
    border-color: var(--fangstr-attention-light);
}

.account__button:active {
    background-color: var(--fangstr-attention-dark);
    border-color: var(--fangstr-attention-dark);
}

.account__button--secondary {
    margin-top: 0;
    background-color: transparent;
    color: var(--fangstr-attention);
    border: 2px solid var(--fangstr-attention);
}

.account__button--secondary:hover {
    border-color: var(--fangstr-attention-light);
    color: var(--fangstr-attention-light);
}

.account__button--tertiary {
    padding: 0.25rem 0.5rem;
    background-color: transparent;
    color: var(--fangstr-attention);
    border: 2px solid transparent;
}

.account__button--tertiary:hover {
    color: var(--fangstr-attention-light);
    text-decoration: none;
}

.account__button--tertiary.account__link--small {
    font-size: var(--fangstr-font-size-small);
}

.account__button:focus-visible,
.account__button--secondary:focus-visible,
.account__button--tertiary:focus-visible {
    outline: 0;
    box-shadow: 0 0 4px 2px var(--fangstr-attention-light);
}

.account__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.account__divider-line {
    height: 1px;
    background: var(--fangstr-border);
    flex: 1;
}

.account__divider-text,
.account__muted {
    color: var(--fangstr-medium);
    font-size: var(--fangstr-font-size-small);
}

.account__center {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    text-align: center;
}

/* External links follow the app's link-external button: underlined, regular weight. */
.account__link {
    color: var(--fangstr-link);
    text-decoration: underline;
    text-decoration-color: var(--fangstr-link);
    text-underline-offset: 4px;
    padding-bottom: 0.25rem;
}

.account__link:hover {
    color: var(--fangstr-purple-500);
    text-decoration-color: var(--fangstr-purple-500);
}

html.theme-night .account__link:hover {
    color: var(--fangstr-purple-600);
    text-decoration-color: var(--fangstr-purple-600);
}

.account__link--small {
    font-size: var(--fangstr-font-size-small);
}

.account__link--back {
    align-self: flex-start;
}

.account .validation-summary {
    color: var(--fangstr-orange);
    font-size: var(--fangstr-font-size-small);
}

.account .validation-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

@media (max-width: 768px) {
    .account {
        grid-template-columns: 1fr;
        position: relative;
        background-color: var(--fangstr-primary);
    }

    .account__image {
        display: none;
    }

    .account__content {
        padding: 3rem 2.5rem;
        min-height: fit-content;
    }

    .account--curved .account__image {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: 50%;
        bottom: 0;
    }

    .account--curved .account__content {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 84vh;
        border-bottom-left-radius: 50% 15%;
        border-bottom-right-radius: 50% 15%;
    }
}
