/* OAuth Enhanced Frontend Styles */

/* Login Button Styles */
.mo-oauth-enhanced-login-btn,
.mo-oauth-enhanced-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.mo-oauth-enhanced-login-btn:hover,
.mo-oauth-enhanced-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mo-oauth-enhanced-login-btn:focus,
.mo-oauth-enhanced-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* Default Button Style */
.mo-oauth-enhanced-btn {
    background-color: #0073aa;
    color: white;
    border-color: #005a87;
}

.mo-oauth-enhanced-btn:hover {
    background-color: #005a87;
    color: white;
}

/* Provider-Specific Button Styles */
.mo-oauth-enhanced-btn-google {
    background-color: #4285f4;
    color: white;
    border-color: #3367d6;
}

.mo-oauth-enhanced-btn-google:hover {
    background-color: #3367d6;
    color: white;
}

.mo-oauth-enhanced-btn-microsoft {
    background-color: #00a1f1;
    color: white;
    border-color: #0078d4;
}

.mo-oauth-enhanced-btn-microsoft:hover {
    background-color: #0078d4;
    color: white;
}

.mo-oauth-enhanced-btn-github {
    background-color: #333;
    color: white;
    border-color: #24292e;
}

.mo-oauth-enhanced-btn-github:hover {
    background-color: #24292e;
    color: white;
}

.mo-oauth-enhanced-btn-canvas {
    background-color: #008ee2;
    color: white;
    border-color: #0066cc;
}

.mo-oauth-enhanced-btn-canvas:hover {
    background-color: #0066cc;
    color: white;
}

.mo-oauth-enhanced-btn-okta {
    background-color: #007dc1;
    color: white;
    border-color: #005a87;
}

.mo-oauth-enhanced-btn-okta:hover {
    background-color: #005a87;
    color: white;
}

.mo-oauth-enhanced-btn-auth0 {
    background-color: #eb5424;
    color: white;
    border-color: #d63a1a;
}

.mo-oauth-enhanced-btn-auth0:hover {
    background-color: #d63a1a;
    color: white;
}

.mo-oauth-enhanced-btn-custom {
    background-color: #666;
    color: white;
    border-color: #555;
}

.mo-oauth-enhanced-btn-custom:hover {
    background-color: #555;
    color: white;
}

/* Provider Button Container */
.mo-oauth-enhanced-provider-button {
    margin-bottom: 10px;
}

.mo-oauth-enhanced-providers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.mo-oauth-enhanced-providers-container.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

/* Icon Support (if using icons) */
.mo-oauth-enhanced-btn::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mo-oauth-enhanced-btn-google::before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuMTcgNy44NUg4LjY1VjguMTVIOVY4LjE1SDkuMTdWNy44NVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik05IDE2LjJDMTMuMzA2MSAxNi4yIDE2LjggMTIuNzA2MSAxNi44IDguNEMxNi44IDQuMDkzOSAxMy4zMDYxIDAuNiA5IDAuNkM0LjY5MzkgMC42IDEuMiA0LjA5MzkgMS4yIDguNEMxLjIgMTIuNzA2MSA0LjY5MzkgMTYuMiA5IDE2LjJaIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMiIvPgo8L3N2Zz4K');
}

/* Loading State */
.mo-oauth-enhanced-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.mo-oauth-enhanced-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: mo-oauth-spin 1s linear infinite;
}

@keyframes mo-oauth-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.mo-oauth-enhanced-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

.mo-oauth-enhanced-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Login Form Integration */
.mo-oauth-enhanced-login-wrapper {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    border-top: 1px solid #ddd;
}

.mo-oauth-enhanced-login-wrapper h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #555;
}

.mo-oauth-enhanced-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.mo-oauth-enhanced-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
}

.mo-oauth-enhanced-divider span {
    background-color: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mo-oauth-enhanced-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    
    .mo-oauth-enhanced-providers-container.horizontal {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .mo-oauth-enhanced-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mo-oauth-enhanced-divider::before {
        background-color: #555;
    }
    
    .mo-oauth-enhanced-divider span {
        background-color: #1a1a1a;
        color: #ccc;
    }
    
    .mo-oauth-enhanced-error {
        background-color: #442927;
        border-color: #7a4a47;
        color: #f8d7da;
    }
    
    .mo-oauth-enhanced-success {
        background-color: #2d5a31;
        border-color: #4a7c59;
        color: #d4edda;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mo-oauth-enhanced-btn {
        border-width: 3px;
        font-weight: bold;
    }
    
    .mo-oauth-enhanced-btn:focus {
        box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mo-oauth-enhanced-btn {
        transition: none;
    }
    
    .mo-oauth-enhanced-btn:hover {
        transform: none;
    }
    
    @keyframes mo-oauth-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
} 