/* Sign-in with an identity provider (OAuth): the provider buttons shown on the anonymous
   pages (login, register), and the popup detailing a failed sign-in on the login page. */

.oauth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 410px;
    margin: 4px 0 16px 0;
    color: #808080;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

    .oauth-separator::before,
    .oauth-separator::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: #d7d7d7;
    }

.oauth-providers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 410px;
    margin-bottom: 12px;
}

.oauth-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 calc(50% - 10px);
    min-width: 130px;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d7d7d7;
    border-radius: 9px;
    background-color: #ffffff;
    color: #686868;
    text-decoration: none;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

    /* No transform on hover: scaling promotes the button to its own compositing layer,
       which the browser rasterizes at the old size and leaves blurry during the transition. */
    .oauth-provider:hover {
        background-color: #f4f4f4;
        border-color: #b0b0b0;
    }

/* .login-container img carries a 42px bottom margin for the product logo, cancel it here. */
.login-container .oauth-provider img {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
}

@media screen and (max-width:799px) {
    .oauth-separator,
    .oauth-providers {
        width: 300px;
    }
}

@media screen and (max-width:399px) {
    .oauth-separator,
    .oauth-providers {
        width: 260px;
    }

    .oauth-provider {
        flex: 1 1 100%;
    }
}

/* Detail of a failed OAuth sign-in, opened from the "more info" link of the error banner. */

.login-error-more {
    margin-left: 6px;
    color: #c0392b;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

.oauth-error-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.45);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

    .oauth-error-overlay.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.oauth-error-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    font-family: Inter;
    text-align: left;
}

.oauth-error-heading {
    color: #383838;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    padding-right: 24px;
}

.oauth-error-text {
    color: #686868;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.oauth-error-diagnosis {
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 500;
    word-break: break-all;
}

/* login.css styles every button as the full width orange call to action, override it here. */
.oauth-error-card .oauth-error-ok {
    align-self: flex-end;
    width: auto;
    margin: 6px 0 0 0;
    padding: 8px 22px;
    border-radius: 9px;
    background: #ffffff;
    border: 1px solid #d7d7d7;
    color: #686868;
    font-size: 16px;
    font-weight: 500;
    text-shadow: none;
    filter: none;
    transition: background-color .2s, border-color .2s;
}

    .oauth-error-card .oauth-error-ok:hover {
        transform: none;
        background: #f4f4f4;
        border-color: #b0b0b0;
    }

.oauth-error-card .oauth-error-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: auto;
    margin: 0;
    padding: 0 4px;
    background: none;
    border: none;
    border-radius: 0;
    color: #b0b0b0;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
    text-shadow: none;
    filter: none;
    transition: color .2s;
}

    .oauth-error-card .oauth-error-close:hover {
        transform: none;
        background: none;
        color: #686868;
    }
