/*!
 * ---------------------------------------------------------------------
 * SingleSignOn is a plugin which allows to use SSO for auth
 * ---------------------------------------------------------------------
 * Copyright (C) 2026 Edgard
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
 * @copyright Copyright © 2021 - 2026 Edgard
 * @license   http://www.gnu.org/licenses/gpl.txt GPLv3+
 * @link      https://github.com/edgardmessias/glpi-singlesignon/
 * ---------------------------------------------------------------------
 */

.singlesignon-google-buttons {
    width: 100%;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.75rem;
    justify-items: stretch;
}

.singlesignon-google-button {
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid #d9dee5;
    background: #ffffff;
    color: #23374c;
    text-decoration: none;
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: none;
}

.singlesignon-google-button:hover {
    background: #f8fafc;
    border-color: #78bf43;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    color: #23374c;
}

.singlesignon-google-button:focus-visible {
    outline: 0;
    border-color: #78bf43;
    box-shadow: 0 0 0 4px rgba(120, 191, 67, 0.18);
}

.singlesignon-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.singlesignon-google-icon-bg {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.singlesignon-google-g {
    width: 18px;
    height: 18px;
    display: block;
}

.singlesignon-google-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Explicit variants (as shown in Google docs): light / dark / neutral */
.singlesignon-google-button--light {
    background: #ffffff;
    border-color: #d9dee5;
    color: #23374c;
    box-shadow: none;
}

.singlesignon-google-button--light:hover {
    background: #f8fafc;
    border-color: #78bf43;
    color: #23374c;
}

.singlesignon-google-button--neutral {
    background: #f2f2f2;
    border-color: #d9dee5;
    color: #23374c;
}

.singlesignon-google-button--neutral:hover {
    background: #e9e9e9;
    border-color: #78bf43;
    color: #23374c;
}

.singlesignon-google-button--dark {
    background: #131314;
    border-color: #8e918f;
    color: #e3e3e3;
    box-shadow: none;
}

.singlesignon-google-button--dark:hover {
    background: #1b1b1c;
    color: #e3e3e3;
}

.singlesignon-login-classic {
    margin-top: 0.95rem;
}

.singlesignon-login-classic .btn-link {
    color: var(--sso-muted);
    text-decoration: none;
    font-size: 0.92rem;
}

.singlesignon-login-classic .btn-link:hover,
.singlesignon-login-classic .btn-link:focus-visible {
    color: var(--sso-accent);
    text-decoration: underline;
}

.singlesignon-auth-stack {
    width: 100%;
}

.singlesignon-auth-pane {
    will-change: transform, opacity;
    width: 100%;
}

.singlesignon-auth-section--oauth {
    margin-bottom: 0;
}

.singlesignon-auth-section--oauth .singlesignon-login {
    margin-top: 0;
}

.singlesignon-auth-section--classic {
    padding: 1rem 1rem 0.95rem;
    border: 1px solid color-mix(in srgb, var(--sso-border) 92%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--sso-button-bg) 88%, transparent);
}

.singlesignon-classic-title {
    margin-bottom: 1rem !important;
}

.singlesignon-classic-title h2 {
    font-size: 1.08rem;
    font-weight: 650;
}

@media (prefers-color-scheme: dark) {
    .singlesignon-auth-stack,
    .singlesignon-login {
        --sso-surface: rgba(17, 24, 39, 0.86);
        --sso-border: rgba(255, 255, 255, 0.12);
        --sso-shadow: 0 18px 34px -24px rgba(2, 6, 23, 0.95);
        --sso-title: #f3f4f6;
        --sso-text: #e5e7eb;
        --sso-muted: #cbd5e1;
        --sso-button-bg: rgba(15, 23, 42, 0.8);
        --sso-button-border: rgba(255, 255, 255, 0.18);
        --sso-button-hover: rgba(37, 99, 235, 0.2);
        --sso-button-focus: rgba(96, 165, 250, 0.42);
        --sso-accent: #60a5fa;
    }
}

@media (max-width: 575.98px) {
    .singlesignon-login {
        padding: 1rem 0.8rem 0.9rem;
    }

    .singlesignon-login-remember-inner {
        padding: 0.6rem 0.65rem;
        gap: 0.5rem;
    }

    .singlesignon-login-button {
        padding: 0.66rem 0.75rem;
        gap: 0.6rem;
    }

    .singlesignon-login-visual {
        width: 1.85rem;
        height: 1.85rem;
    }

    .singlesignon-auth-section--classic {
        padding: 0.9rem 0.8rem 0.85rem;
    }
}
