/**
 * LMX SSO Logins - Login Button Styles
 *
 * Google-branded button following official branding guidelines.
 * Supports theme (light/dark/outline), shape (rectangular/pill),
 * size (small/medium/large), and width (full/auto) variants.
 *
 * @see https://developers.google.com/identity/branding-guidelines
 *
 * @package LMX_SSO_Logins
 * @since   1.0.0
 */

/* -- Container ------------------------------------------------------------ */

.lmx-sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 16px 0;
    text-align: center;
}

/* -- Separator ------------------------------------------------------------ */

.lmx-sso-separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 12px;
}

.lmx-sso-separator::before,
.lmx-sso-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #dcdcde;
}

.lmx-sso-separator span {
    font-size: 13px;
    color: #787c82;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* =========================================================================
   BASE BUTTON
   ========================================================================= */

.lmx-sso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #dadce0;
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    box-sizing: border-box;
}

.lmx-sso-btn:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* -- Button Icon ---------------------------------------------------------- */

.lmx-sso-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.lmx-sso-btn-icon svg {
    width: 20px;
    height: 20px;
}

/* -- Button Text ---------------------------------------------------------- */

.lmx-sso-btn-text {
    flex: 1;
    text-align: center;
}

/* =========================================================================
   THEMES
   ========================================================================= */

/* Light (default) */
.lmx-sso-theme-light {
    background-color: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.lmx-sso-theme-light:hover {
    background-color: #f7f8f8;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
    border-color: #c6c9cc;
    color: #3c4043;
}

.lmx-sso-theme-light:active {
    background-color: #f1f3f4;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
}

/* Dark */
.lmx-sso-theme-dark {
    background-color: #131314;
    color: #e3e3e3;
    border-color: #131314;
}

.lmx-sso-theme-dark:hover {
    background-color: #1f1f20;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.lmx-sso-theme-dark:active {
    background-color: #2a2a2b;
}

.lmx-sso-theme-dark .lmx-sso-btn-icon svg path[fill="#4285F4"] {
    fill: #8ab4f8;
}

.lmx-sso-theme-dark .lmx-sso-btn-icon svg path[fill="#34A853"] {
    fill: #81c995;
}

.lmx-sso-theme-dark .lmx-sso-btn-icon svg path[fill="#FBBC05"] {
    fill: #fdd663;
}

.lmx-sso-theme-dark .lmx-sso-btn-icon svg path[fill="#EA4335"] {
    fill: #f28b82;
}

/* Outline */
.lmx-sso-theme-outline {
    background-color: transparent;
    color: #3c4043;
    border-color: #747775;
    border-width: 2px;
}

.lmx-sso-theme-outline:hover {
    background-color: rgba(66, 133, 244, 0.04);
    border-color: #4285f4;
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.15);
    color: #3c4043;
}

.lmx-sso-theme-outline:active {
    background-color: rgba(66, 133, 244, 0.08);
}

/* =========================================================================
   SHAPES
   ========================================================================= */

.lmx-sso-shape-rectangular {
    border-radius: 6px;
}

.lmx-sso-shape-pill {
    border-radius: 100px;
}

/* =========================================================================
   SIZES
   ========================================================================= */

.lmx-sso-size-small {
    padding: 6px 12px;
    font-size: 12px;
}

.lmx-sso-size-small .lmx-sso-btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.lmx-sso-size-small .lmx-sso-btn-icon svg {
    width: 16px;
    height: 16px;
}

.lmx-sso-size-medium {
    padding: 10px 16px;
    font-size: 14px;
}

.lmx-sso-size-large {
    padding: 14px 24px;
    font-size: 16px;
}

.lmx-sso-size-large .lmx-sso-btn-icon {
    width: 22px;
    height: 22px;
    margin-right: 12px;
}

.lmx-sso-size-large .lmx-sso-btn-icon svg {
    width: 22px;
    height: 22px;
}

/* =========================================================================
   WIDTH
   ========================================================================= */

.lmx-sso-width-full {
    width: 100%;
    max-width: 400px;
}

.lmx-sso-width-auto {
    width: auto;
}

/* =========================================================================
   ERROR MESSAGE
   ========================================================================= */

.lmx-sso-error {
    background-color: #fef0f0;
    border: 1px solid #f5c6c6;
    color: #cc3333;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

/* =========================================================================
   CONTEXT: WooCommerce My Account
   ========================================================================= */

.lmx-sso-context-wc_login {
    max-width: 480px;
    margin: 0 auto 28px;
    padding: 24px 0;
    text-align: center;
}

.lmx-sso-context-wc_login .lmx-sso-btn {
    max-width: 100%;
    width: 100%;
}

.lmx-sso-context-wc_login .lmx-sso-separator {
    margin: 18px 0 0;
}

/* -- WooCommerce Checkout ------------------------------------------------- */

.lmx-sso-context-wc_checkout {
    max-width: 480px;
    margin: 0 auto 20px;
    text-align: center;
}

.lmx-sso-context-wc_checkout .lmx-sso-btn {
    max-width: 100%;
}

/* -- WordPress Login ------------------------------------------------------ */

#loginform .lmx-sso-buttons {
    margin: 16px 0 8px;
}

#loginform .lmx-sso-width-full {
    max-width: 100%;
}

/* =========================================================================
   MAGIC LINK BUTTON - Matches Google button styling
   ========================================================================= */

.lmx-sso-btn-magic {
    cursor: pointer;
    border: none;
}

.lmx-sso-btn-magic.lmx-sso-theme-light {
    background-color: #fff;
    color: #1f2937;
    border: 1px solid #d0d5dd;
}

.lmx-sso-btn-magic.lmx-sso-theme-light:hover {
    background-color: #f9fafb;
}

.lmx-sso-btn-magic.lmx-sso-theme-dark {
    background-color: #111827;
    color: #fff;
}

.lmx-sso-btn-magic.lmx-sso-theme-dark:hover {
    background-color: #1f2937;
}

.lmx-sso-btn-magic.lmx-sso-theme-outline {
    background-color: transparent;
    color: #111827;
    border: 1px solid #d0d5dd;
}

.lmx-sso-btn-magic.lmx-sso-theme-outline:hover {
    background-color: #f3f4f6;
}

.lmx-sso-btn-magic .lmx-sso-btn-icon svg {
    stroke: currentColor;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 480px) {
    .lmx-sso-btn {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 12px;
    }

    .lmx-sso-width-auto {
        width: 100%;
    }
}