.google-button-host iframe {
    /* Google controls the frame width and its surrounding spacing. The older
       responsive max-width rule shrank the frame, cropping the button's edge. */
    max-width: none;
}

.header-actions > .google-header-button {
    display: flex;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    min-height: 48px;
    filter: drop-shadow(0 4px 9px rgba(75, 24, 53, 0.1));
    transition: filter 180ms ease, transform 180ms ease;
}

.header-actions > .google-header-button:hover {
    filter: drop-shadow(0 7px 14px rgba(75, 24, 53, 0.18));
    transform: translateY(-1px);
}

/* The fallback is the only visible sign-in control until Google renders.
   Do not reserve a second button's width when its script is slow or blocked. */
.header-actions > .google-header-button:not(.google-button-rendered) {
    display: none;
}

.header-actions > .google-header-fallback {
    display: inline-flex;
    width: 220px;
    min-width: 220px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: #42393d;
    background: #fff;
    border: 1px solid #d8ceca;
    border-radius: 999px;
    box-shadow: 0 5px 11px rgba(75, 24, 53, 0.1);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions > .google-button-rendered ~ .google-header-fallback {
    display: none;
}

.sign-in-card .google-button-host {
    min-height: 50px;
    filter: drop-shadow(0 5px 10px rgba(75, 24, 53, 0.12));
}

.sign-in-card .google-button {
    border-radius: 999px;
    box-shadow: 0 5px 14px rgba(75, 24, 53, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .header-actions > .google-header-button {
        transition: none;
        transform: none;
    }
}

@media (max-width: 680px) {
    .header-actions > .google-header-button {
        display: flex;
        width: 184px;
        min-width: 184px;
        max-width: 184px;
    }

    .header-actions > .google-header-fallback {
        width: 184px;
        min-width: 184px;
    }

    .header-actions {
        gap: 0;
    }
}

@media (max-width: 440px) {
    .header-inner:not(.header-inner-authenticated) {
        height: auto;
        min-height: 70px;
        grid-template-columns: 1fr;
        row-gap: 2px;
        padding-block: 10px;
    }

    .header-inner:not(.header-inner-authenticated) .header-actions {
        grid-column: 1;
        justify-self: end;
    }

    .header-actions > .google-header-button,
    .header-actions > .google-header-fallback {
        width: 210px;
        min-width: 210px;
        max-width: 210px;
    }
}
