/*
 * Reusable "Sign in with Microsoft" button.
 *
 * Follows Microsoft Identity brand guidelines:
 *   https://learn.microsoft.com/en-us/entra/identity-platform/howto-add-branding-in-apps
 *
 * Three themes are supported:
 *   - microsoft-login-button--light   (white button, dark text)   [default]
 *   - microsoft-login-button--dark    (dark button, light text)
 *   - microsoft-login-button--neutral (light grey, dark text)
 */

.microsoft-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 40px;
    min-width: 215px;
    padding: 0 16px;
    /* Border/radius kept in lock-step with the Google button so the two */
    /* quick-start options read as a matched pair. Microsoft's own brand */
    /* guidance is 1px #8c8c8c / 2px radius, but UI consistency wins here. */
    border-radius: 4px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #5e5e5e;
    font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 40px;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    user-select: none;
    box-sizing: border-box;
}

.microsoft-login-button:hover,
.microsoft-login-button:focus {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    text-decoration: none;
}

.microsoft-login-button:focus-visible {
    outline: 2px solid #2f2f2f;
    outline-offset: 2px;
}

.microsoft-login-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
}

.microsoft-login-button__icon svg {
    display: block;
}

.microsoft-login-button__label {
    flex: 0 1 auto;
    white-space: nowrap;
}

/* Theme: dark - border aligned with Google's dark theme. */
.microsoft-login-button--dark {
    background: #2f2f2f;
    color: #ffffff;
    border-color: #8e918f;
}

.microsoft-login-button--dark:hover,
.microsoft-login-button--dark:focus {
    background: #1f1f1f;
}

/* Theme: neutral (light grey) */
.microsoft-login-button--neutral {
    background: #f2f2f2;
    color: #5e5e5e;
    border-color: transparent;
}

.microsoft-login-button--neutral:hover,
.microsoft-login-button--neutral:focus {
    background: #e8e8e8;
}

/* Loading state - set by microsoft-login-button.js on click */
.microsoft-login-button--loading {
    opacity: 0.75;
    pointer-events: none;
}

/* Disabled state - applied server-side when OAuth isn't configured */
.microsoft-login-button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
