.facenimal-auth-page {
    margin: auto;
}

.facenimal-auth {
    box-sizing: border-box;
    color: #17212b;
    margin: 0 auto;
    max-width: 560px;
    padding: 14px;
    width: 100%;
}

.facenimal-auth *,
.facenimal-auth *::before,
.facenimal-auth *::after {
    box-sizing: border-box;
}

.facenimal-auth-panel {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.facenimal-auth-head {
    display: grid;
    gap: 5px;
}

.facenimal-auth-head h2 {
    color: #101828;
    font-size: 18px;
    font-weight: 900;
    margin: 0;
}

.facenimal-auth-head p,
.facenimal-auth-alt {
    color: #667085;
    font-size: 12px;
    margin: 0;
}

.facenimal-auth-form {
    display: grid;
    gap: 10px;
}

.facenimal-auth-social {
    display: grid;
    gap: 12px;
}

.facenimal-auth-social-divider {
    align-items: center;
    color: #667085;
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 10px;
    grid-template-columns: 1fr auto 1fr;
    text-align: center;
}

.facenimal-auth-social-divider::before,
.facenimal-auth-social-divider::after {
    background: #e4e7ec;
    content: "";
    display: block;
    height: 1px;
}

.facenimal-auth-social-shortcode {
    display: grid;
    gap: 10px;
}

.facenimal-auth-social-shortcode .fn-google-login-btn,
.facenimal-auth-social-shortcode .fn-facebook-login-btn {
    box-sizing: border-box;
    margin: 0 auto !important;
    max-width: 100% !important;
}

.fn-social-login-wrap {
    display: grid;
    gap: 12px;
}

.fn-google-login-btn,
.fn-facebook-login-btn {
    align-items: center;
    border: 1px solid #101828;
    border-radius: 13px;
    box-shadow: rgba(100, 100, 111, 0.18) 0 7px 22px 0;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    font-size: 16px;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    margin: 0 auto !important;
    min-height: 46px;
    padding: 10px 16px;
    transition: background .2s, box-shadow .2s;
    width: 100% !important;
}

.fn-google-login-btn {
    background: #fff !important;
    color: #101828;
}

.fn-google-login-btn:hover {
    background: #f8f8f8 !important;
}

.fn-facebook-login-btn {
    background: #1877f2 !important;
    color: #fff;
}

.fn-facebook-login-btn:hover {
    background: #166fe5 !important;
    color: #fff;
}

.fn-google-login-btn .google-icon,
.fn-facebook-login-btn .facebook-icon {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex: 0 0 auto;
    height: 26px;
    width: 26px;
}

.fn-google-login-btn .google-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%234285F4' d='M24 9.5c3.1 0 5.8 1.1 8 3.1l6-6C34.4 2.8 29.6 0 24 0 14.6 0 6.4 5.4 2.5 13.2l7 5.4C11.3 13.2 17.1 9.5 24 9.5z'/%3E%3Cpath fill='%2334A853' d='M46.1 24.5c0-1.7-.1-2.9-.4-4.2H24v8h12.7c-.6 3-2.3 5.5-4.8 7.2l7.4 5.7c4.3-4 6.8-9.9 6.8-16.7z'/%3E%3Cpath fill='%23FBBC05' d='M9.5 28.6c-.5-1.4-.8-2.9-.8-4.6s.3-3.2.8-4.6l-7-5.4C.9 16.7 0 20.2 0 24s.9 7.3 2.5 10l7-5.4z'/%3E%3Cpath fill='%23EA4335' d='M24 48c5.6 0 10.4-1.8 13.9-4.8l-7.4-5.7c-2.1 1.4-4.7 2.3-6.5 2.3-6.9 0-12.7-3.7-14.8-9.1l-7 5.4C6.4 42.6 14.6 48 24 48z'/%3E%3C/svg%3E");
}

.fn-facebook-login-btn .facebook-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M22 12a10 10 0 1 0-11.6 9.9v-7h-2.8v-2.9h2.8V9.7c0-2.8 1.7-4.4 4.3-4.4 1.2 0 2.4.2 2.4.2v2.7h-1.3c-1.3 0-1.7.8-1.7 1.6v1.9h2.9l-.5 2.9h-2.4v7A10 10 0 0 0 22 12z'/%3E%3C/svg%3E");
}

body.fn-google-login-started .facenimal-auth-panel {
    min-height: 220px;
    position: relative;
}

body.fn-google-login-started .facenimal-auth-panel > * {
    opacity: 0;
    pointer-events: none;
}

body.fn-google-login-started .facenimal-auth-panel::after {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    color: #006400;
    content: attr(data-facenimal-auth-working);
    display: flex;
    font-size: 17px;
    font-weight: 900;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: absolute;
    text-align: center;
}

.facenimal-auth-form label {
    color: #344054;
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
}

.facenimal-auth-form input,
.facenimal-auth-form select {
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    color: #101828;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    min-height: 38px;
    outline: none;
    padding: 8px 10px;
    width: 100%;
}

.facenimal-auth-form input:focus,
.facenimal-auth-form select:focus {
    border-color: #8fd8a8;
    box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.08);
}

.facenimal-auth-check {
    align-items: center;
    display: flex !important;
    gap: 7px !important;
}

.facenimal-auth-check input {
    min-height: 0;
    width: auto;
}

.facenimal-auth-terms {
    align-items: flex-start;
    color: #475467;
    font-size: 11px !important;
    font-weight: 800;
    line-height: 1.35;
}

.facenimal-auth-terms input {
    flex: 0 0 auto;
    margin-top: 1px;
}

.facenimal-auth-terms a {
    color: #006400;
    font-weight: 900;
    text-decoration: none;
}

.facenimal-auth-terms a:hover {
    text-decoration: underline;
}

.facenimal-auth-terms-intro {
    color: #475467;
    font-size: 12px;
    font-weight: 800;
    margin: 0;
}

.facenimal-auth-submit {
    align-items: center;
    background: #006400;
    border: 1px solid #006400;
    border-radius: 999px;
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    text-decoration: none;
}

.facenimal-auth-alt a {
    color: #006400;
    font-weight: 900;
    text-decoration: none;
}

.facenimal-auth-notice {
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 10px;
}

.facenimal-auth-notice.is-error {
    background: #fff1f3;
    color: #b42318;
}

.facenimal-auth-notice.is-success {
    background: #ecfdf3;
    color: #006400;
}

/* Phone country picker (registration) */
.facenimal-phone-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fn-country-combo {
    position: relative;
}

.facenimal-auth-form .fn-country-search {
    width: 100%;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    color: #101828;
    padding: 10px 12px;
    font-size: 15px;
    box-sizing: border-box;
}

.facenimal-auth-form .fn-country-search:focus {
    border-color: #8fd8a8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(143, 216, 168, 0.35);
}

.fn-country-list {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.fn-country-item {
    padding: 9px 10px;
    border-radius: 8px;
    color: #101828;
    font-size: 14px;
    cursor: pointer;
}

.fn-country-item:hover {
    background: #f2f7f4;
    color: #006400;
}

/* Google Sign-In button (GIS is rendered by Google; we only size/center it) */
.facenimal-google-signin {
    width: 100%;
    margin: 10px 0;
}

.facenimal-google-btn-target {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    /* Google's frame is white and arrives before the button is painted inside it,
       which on the dark theme is a white rectangle appearing and going away. The
       frame is exactly this column's width — we ask for 20px less and Google adds
       10 on each side — so rounding the box turns that flash into the shape of the
       button rather than a slab. */
    border-radius: 22px;
    overflow: hidden;
}

/* Do not touch Google's own geometry. It renders the button 20px wider than the
   width we ask for and pulls it back with `margin: -2px -10px`, so that the button
   itself — not the frame around it — lines up with the form. Centring it with
   `margin: 0 auto !important` removed that compensation, and a global
   `max-width: 100%` then clamped a 344px frame into a 324px box: the rounded right
   end of the pill was cut off, which is what a phone showed. Measured after the
   fix at 390px: frame 23..367, button centred on the field column, both ends whole.
   Centring is the flex container's job, above. */
.facenimal-google-btn-target > div,
.facenimal-google-btn-target iframe {
    max-width: none !important;
}
