/**
 * Google Login Module Styles
 *
 * @author STEMVIET
 * @copyright 2024 STEMVIET
 * @license AFL-3.0
 */

/* Google Login Container */
.google-login-container {
    margin: 20px 0;
    text-align: center;
}

/* Divider */
.google-login-divider {
    position: relative;
    margin: 20px 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.google-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    z-index: 1;
}

.google-login-divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Google Login Button */
.google-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #dadce0;
    border-radius: 8px;
    color: #3c4043;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.google-login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.google-login-button:hover::before {
    left: 100%;
}

.google-login-button:hover {
    background: #f8f9fa;
    border-color: #c8cbcd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    text-decoration: none;
    color: #3c4043;
}

.google-login-button:active {
    background: #f1f3f4;
    border-color: #c8cbcd;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    transform: translateY(0);
}

.google-login-button:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66,133,244,0.1), 0 2px 6px rgba(0,0,0,0.15);
}

/* Google Icon */
.google-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Button Text */
.google-login-text {
    white-space: nowrap;
}

/* Loading State */
.google-login-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.google-login-button.loading .google-login-text::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ccc;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error States */
.google-login-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.google-login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.google-login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .google-login-button {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .google-login-button:hover {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .google-login-button:active {
        background: #2d3748;
    }

    .google-login-button:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99,179,237,0.1), 0 2px 6px rgba(0,0,0,0.15);
    }

    .google-login-divider {
        color: #a0aec0;
    }

    .google-login-divider::before {
        background: linear-gradient(90deg, transparent, #4a5568, transparent);
    }

    .google-login-divider span {
        background: #2d3748;
        color: #a0aec0;
    }

    .google-login-message.success {
        background: rgba(72,187,120,0.1);
        color: #48bb78;
        border-color: rgba(72,187,120,0.3);
    }

    .google-login-message.error {
        background: rgba(245,101,101,0.1);
        color: #f56565;
        border-color: rgba(245,101,101,0.3);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .google-login-container {
        margin: 15px 0;
    }

    .google-login-button {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
        font-size: 16px;
    }

    .google-login-divider {
        margin: 15px 0;
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .google-login-button {
        border-width: 3px;
    }

    .google-login-button:focus {
        border-color: #000;
        box-shadow: 0 0 0 4px #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .google-login-button {
        transition: none;
    }

    .google-login-button::before {
        display: none;
    }

    .google-login-button.loading .google-login-text::after {
        animation: none;
    }
}