/**
 * OAuth 相關樣式
 */

/* OAuth 錯誤訊息 */
.pmm-oauth-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 10px 0;
    padding: 12px;
}

.pmm-oauth-error p {
    margin: 0;
    font-size: 14px;
}

.pmm-oauth-error p.error {
    font-weight: bold;
    margin-bottom: 5px;
}

/* OAuth 載入中狀態 */
.pmm-oauth-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.pmm-oauth-loading.show {
    display: block;
}

.pmm-oauth-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* OAuth 按鈕載入狀態 */
.pmm-social-login-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pmm-social-login-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: spin 1s linear infinite;
}

/* OAuth 成功訊息 */
.pmm-oauth-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin: 10px 0;
    padding: 12px;
}

/* OAuth 按鈕容器 */
.pmm-oauth-buttons {
    margin: 20px 0;
}

.pmm-oauth-buttons .pmm-social-login-btn {
    position: relative;
    transition: all 0.3s ease;
}

.pmm-oauth-buttons .pmm-social-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* OAuth 按鈕禁用狀態 */
.pmm-oauth-buttons .pmm-social-login-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* OAuth 設定提示 */
.pmm-oauth-setup-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    margin: 10px 0;
    padding: 12px;
}

.pmm-oauth-setup-notice p {
    margin: 0;
    font-size: 14px;
}

/* OAuth 連結狀態 */
.pmm-oauth-linked {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
    margin: 10px 0;
    padding: 12px;
}

.pmm-oauth-linked p {
    margin: 0;
    font-size: 14px;
}

/* OAuth 按鈕響應式設計 */
@media (max-width: 768px) {
    .pmm-oauth-buttons {
        margin: 15px 0;
    }
    
    .pmm-oauth-buttons .pmm-social-login-btn {
        margin-bottom: 10px;
    }
    
    .pmm-oauth-error,
    .pmm-oauth-success,
    .pmm-oauth-setup-notice,
    .pmm-oauth-linked {
        margin: 8px 0;
        padding: 10px;
    }
}

/* OAuth 按鈕動畫效果 */
.pmm-social-login-btn {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OAuth 按鈕點擊效果 */
.pmm-social-login-btn:active {
    transform: scale(0.98);
}

/* OAuth 按鈕焦點狀態 */
.pmm-social-login-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* OAuth 按鈕無障礙支援 */
.pmm-social-login-btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* OAuth 按鈕載入文字 */
.pmm-social-login-btn.loading .btn-text {
    visibility: hidden;
}

/* OAuth 按鈕圖示載入狀態 */
.pmm-social-login-btn.loading .btn-icon {
    opacity: 0.5;
}

/* OAuth 錯誤重試按鈕 */
.pmm-oauth-retry {
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
    padding: 6px 12px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.pmm-oauth-retry:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

/* OAuth 設定連結 */
.pmm-oauth-setup-link {
    color: #0073aa;
    text-decoration: underline;
}

.pmm-oauth-setup-link:hover {
    color: #005a87;
    text-decoration: none;
}

/* 社交登入區塊 */
.pmm-social-login-section {
    margin: 20px 0;
    padding: 20px 0;
}

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

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

.pmm-divider span {
    background-color: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 深色主題支援 */
@media (prefers-color-scheme: dark) {
    .pmm-divider span {
        background-color: #1a1a1a;
    }
} 