/* Loaded only when the browser-managed Google sign-in is enabled. Reserve the
   row before JavaScript runs so the legacy button never flashes on refresh. */
.kidia-social-buttons { position: relative; min-height: 53px; }
.kidia-social-buttons:not(.kidia-google-fallback) .nsl-container { display: none !important; }
.kidia-google-preparing {
    display:flex; align-items:center; justify-content:center; gap:12px; direction:rtl;
    width:100%; height:53px; box-sizing:border-box; border:1px solid #d7e3e0;
    border-radius:999px; background:#fff; color:#567b74; font-size:16px; cursor:progress;
}
.kidia-google-preparing-logo { display:flex; width:24px; height:24px; flex:0 0 24px; }
.kidia-google-preparing-spinner {
    display:block; width:16px; height:16px; flex:0 0 16px; box-sizing:border-box;
    border:2px solid #dcefeb; border-top-color:#4fa99c; border-radius:50%;
    animation:kidia-google-signin-spin .8s linear infinite;
}
.kidia-google-ready .kidia-google-preparing,
.kidia-google-fallback .kidia-google-preparing { display:none; }
.kidia-google-sheet-button {
    box-sizing: border-box; display: flex; justify-content: center; align-items: center;
    width: 100%; min-width: 0; height: 53px; margin: 0; direction: ltr;
}
.kidia-google-sheet-button[hidden] { display: none !important; }
.kidia-google-sheet-render { flex: none; transform-origin: center; height: 32px; }

/* Google reserves padding outside its visible control; theme iframe caps must not crop it. */
.kidia-google-sheet-render iframe { max-width: none !important; }

/* Keep the reserved row while GIS finishes its iframe; never flash its inline
   placeholder, whose SVG and direction can inherit unrelated theme rules. */
.kidia-social-buttons:not(.kidia-google-ready) .kidia-google-sheet-button {
    position: absolute; inset: 0; pointer-events: none;
}
/* Match the initial official control to its isolated Arabic medium iframe. */
.kidia-social-buttons .kidia-google-sheet-render [role="button"] {
    direction:rtl; font-family:"Google Sans",arial,sans-serif; font-size:14px;
    font-weight:400; line-height:normal; letter-spacing:.25px;
    height:32px; min-height:32px; padding:0 10px; margin:0; box-sizing:border-box;
}
.kidia-social-buttons .kidia-google-sheet-render svg { width:14px!important; height:14px!important; }
.kidia-google-sheet-render [role="button"] > div { direction:rtl; }
.kidia-auth-content .kidia-social-login .kidia-divider { margin: 18px 0; }
.kidia-identifier-form > .kidia-primary-button { display: flex !important; }

.kidia-auth-content .kidia-identifier-form { margin-bottom: 0; }

/* Sign-in progress uses the Kidia brand color; genuine errors keep their alert styling. */
.kidia-social-login [data-kidia-google-status].is-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 30px; margin: 12px 0 0; padding: 0;
    color: #4fa99c; line-height: 1;
}
.kidia-social-login [data-kidia-google-status].is-loading::before {
    content: ''; box-sizing: border-box; display: block;
    width: 26px; height: 26px; flex: 0 0 26px;
    border: 3px solid #dcefeb; border-top-color: #4fa99c;
    border-radius: 50%; animation: kidia-google-signin-spin .8s linear infinite;
}
@keyframes kidia-google-signin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .kidia-social-login [data-kidia-google-status].is-loading::before, .kidia-google-preparing-spinner { animation: none; }
}
