/* Sign in and Account (login.php, account.php): one dark card, centered under
   the header, over the night sky. The same sign-in form also sits in the
   header's sign-in popup (php/rpg/user-menu.php), where the popup's panel is
   the card. */

.sf-account {
    /* Fills the page shell (.creator-shell, a column the screen's height)
       down to the footer, so the footer sits at the bottom of the screen */
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 160px 16px 96px;
}

.sf-account-card {
    width: 100%;
    max-width: 420px;
    align-self: flex-start;
    padding: 32px;
    border: 1px solid var(--sf-gray-600);
    border-radius: var(--portfolio-radius);
    background-color: var(--sf-gray-800);
    box-shadow: 0 12px 32px rgb(0 0 0 / 35%);
    color: var(--sf-gray-100);
    font-family: 'Open Sans', sans-serif;
}

.sf-account-title,
.sf-account-subtitle {
    margin: 0 0 20px;
    color: var(--portfolio-white);
    font-family: 'bebas_neueregular', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
}

.sf-account-subtitle {
    margin: 8px 0 4px;
    font-size: 1.75rem;
}

/* Sign In and Create Account */
.sf-account-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--sf-gray-600);
}

.sf-account-tab {
    margin-bottom: -1px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--sf-gray-300);
    font-family: 'bebas_neueregular', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;

    &:hover {
        color: var(--portfolio-white);
    }

    &.is-active {
        border-bottom-color: var(--frontiers-green);
        color: var(--portfolio-white);
    }

    &:focus-visible {
        outline: 2px solid var(--frontiers-green);
        outline-offset: 2px;
    }
}

/* Google's button: white, with its own G */
.sf-account-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 44px;
    border-radius: var(--portfolio-radius);
    background-color: var(--portfolio-white);
    color: var(--sf-gray-800);
    font-weight: 600;
    text-decoration: none;

    svg {
        width: 18px;
        height: 18px;
    }

    &:hover,
    &:focus-visible {
        background-color: var(--sf-gray-100);
        color: var(--sf-gray-800);
        text-decoration: none;
    }

    &:focus-visible {
        outline: 2px solid var(--frontiers-green);
        outline-offset: 2px;
    }
}

.sf-account-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--sf-gray-300);
    font-size: .875rem;

    &::before,
    &::after {
        content: "";
        flex: 1;
        border-top: 1px solid var(--sf-gray-600);
    }
}

.sf-account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sf-account-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: .875rem;

    span {
        color: var(--sf-gray-200);
    }

    input {
        height: 42px;
        padding: 0 12px;
        border: 1px solid var(--sf-gray-500);
        border-radius: var(--portfolio-radius);
        background-color: var(--sf-gray-700);
        color: var(--portfolio-white);
        font-size: 1rem;

        &:focus {
            border-color: var(--frontiers-green);
            outline: none;
        }
    }
}

.sf-account-hint {
    color: var(--sf-gray-300);
    font-size: .8rem;

    &[hidden] {
        display: none;
    }
}

.sf-account-error,
.sf-account-done,
.sf-account-notice {
    margin: 0;
    font-size: .9rem;

    &[hidden] {
        display: none;
    }
}

.sf-account-error {
    color: var(--sf-crimson-300);
}

.sf-account-done {
    color: var(--sf-green-300);
}

.sf-account-notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-left: 3px solid var(--frontiers-green);
    background-color: var(--sf-gray-700);
}

.sf-account-submit {
    align-self: stretch;
}

/* The account's details */
.sf-account-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 20px;
    margin: 0 0 28px;

    dt {
        color: var(--sf-gray-300);
        font-weight: 400;
    }

    dd {
        margin: 0;
        overflow-wrap: anywhere;
    }
}

.sf-account-logout {
    width: 100%;
    margin-top: 24px;
}

@media only screen and (max-width: 767px) {
    .sf-account {
        padding-top: 110px;
    }

    .sf-account-card {
        padding: 24px 20px;
    }
}

/* In the sign-in popup the panel is the card */
.sf-signin-popup {
    .sf-account-card {
        max-width: none;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }

    /* Room for the close button beside the tabs */
    .sf-account-tabs {
        margin-right: 40px;
    }
}

/* Forgot Password: its title stands in for the tabs */
.sf-account-forgot-title {
    margin: 0 0 16px;
    color: var(--portfolio-white);
    font-family: 'bebas_neueregular', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
}

.sf-account-message {
    margin: 0 0 20px;
    color: var(--sf-gray-200);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

/* The password's label, with Forgot password? at its right */
.sf-account-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.sf-account-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--frontiers-green);
    font: inherit;
    text-decoration: none;
    cursor: pointer;

    &:hover,
    &:focus-visible {
        color: var(--frontiers-green);
        text-decoration: underline;
    }
}

.sf-account-back {
    align-self: center;
    font-size: .9rem;
}

.sf-account-card [hidden] {
    display: none !important;
}

/* The privacy page (privacy.php): the same card, wider, for reading */
.sf-legal {
    max-width: 720px;
    line-height: 1.6;

    h2 {
        margin: 32px 0 8px;
        color: var(--portfolio-white);
        font-family: 'bebas_neueregular', sans-serif;
        font-size: 1.6rem;
        line-height: 1;
    }

    p,
    ul {
        margin: 0 0 12px;
    }

    ul {
        padding-left: 20px;
    }

    li + li {
        margin-top: 4px;
    }

    a {
        color: var(--frontiers-green);
    }

    code {
        color: var(--sf-gray-100);
        background-color: var(--sf-gray-700);
        padding: 1px 5px;
        border-radius: 4px;
    }
}

.sf-legal-date {
    color: var(--sf-gray-300);
    font-size: .875rem;
}

/* The privacy link under the sign-in form */
.sf-account-fine {
    margin: 16px 0 0;
    color: var(--sf-gray-300);
    font-size: .8rem;
    text-align: center;

    a {
        color: var(--sf-gray-200);
    }
}

/* Delete Account, at the foot of the Account page, behind its link */
.sf-account-delete {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--sf-gray-600);
    text-align: center;

    .sf-account-form {
        text-align: left;
    }
}

.sf-account-delete-open {
    color: var(--sf-crimson-300);
    font-size: .875rem;

    &:hover,
    &:focus-visible {
        color: var(--sf-crimson-300);
    }
}

.sf-account-delete-actions {
    display: flex;
    gap: 12px;

    .sf-btn {
        flex: 1;
    }
}
