/* Social Login Lite Forms Styles */

.sll-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sll-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.sll-form-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.sll-form-header .description {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 表單樣式 */
.sll-form {
    margin-bottom: 20px;
}

.sll-form-group {
    margin-bottom: 20px;
}

.sll-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.sll-form-group input[type="text"],
.sll-form-group input[type="email"],
.sll-form-group input[type="tel"],
.sll-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.sll-form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.sll-form-group .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 複選框 */
.sll-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.sll-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* 按鈕樣式 */
.sll-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    text-align: center;
    min-width: 120px;
    position: relative;
}

.sll-btn:hover {
    background: #135e96;
    color: #fff;
}

.sll-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sll-btn-primary {
    background: #2271b1;
    width: 100%;
}

.sll-btn-secondary {
    background: #646970;
}

.sll-btn-link {
    background: transparent;
    color: #2271b1;
    text-decoration: underline;
    padding: 5px 10px;
    min-width: auto;
}

.sll-btn-link:hover {
    background: transparent;
    color: #135e96;
}

/* 載入狀態 */
.sll-btn .btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sll-btn.loading .btn-text {
    opacity: 0;
}

.sll-btn.loading .btn-loading {
    display: block !important;
}

.sll-btn.loading {
    pointer-events: none;
}

/* 表單連結 */
.sll-form-links {
    text-align: center;
    margin: 20px 0;
}

.sll-form-links a {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
}

.sll-form-links a:hover {
    text-decoration: underline;
}

/* 社交登入區域 */
.sll-social-divider {
    position: relative;
    text-align: center;
    margin: 30px 0 20px 0;
}

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

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

.sll-social-buttons {
    text-align: center;
}

/* 註冊表單步驟 */
.sll-step {
    transition: opacity 0.3s, height 0.3s;
}

.sll-step h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

/* 驗證碼欄位 */
.sll-verification-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #2271b1;
}

/* 訊息樣式 */
.sll-form-messages {
    margin-bottom: 20px;
}

.sll-notice {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.sll-notice.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sll-notice.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sll-notice.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.sll-notice.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 成功訊息 */
.sll-success-message {
    text-align: center;
    margin-top: 20px;
}

/* 響應式設計 */
@media (max-width: 480px) {
    .sll-form-container {
        margin: 10px;
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .sll-form-group input {
        font-size: 16px; /* 防止 iOS 放大 */
    }
    
    .sll-form-links a {
        display: block;
        margin: 10px 0;
    }
}

/* 動畫效果 */
.sll-form-container {
    animation: slideInUp 0.3s ease-out;
}

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

/* 輸入驗證樣式 */
.sll-form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.sll-form-group input.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.sll-form-group .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* 載入指示器 */
.sll-loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

/* 自動完成樣式優化 */
.sll-form-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset;
    -webkit-text-fill-color: #333;
}

/* 焦點可見性增強 */
.sll-btn:focus,
.sll-form-group input:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* 深色模式支援（可選） */
@media (prefers-color-scheme: dark) {
    .sll-form-container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .sll-form-header h2,
    .sll-form-group label {
        color: #e2e8f0;
    }
    
    .sll-form-group input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .sll-form-group input:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
    }
}

/* 表單分隔符樣式 */
.sll-social-divider,
.sll-form-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.sll-social-divider:before,
.sll-form-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.sll-social-divider span,
.sll-form-divider span {
    background: #fff;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 社群媒體按鈕容器樣式 */
.sll-social-buttons {
    margin: 20px 0;
}

/* 註冊表單特殊樣式 */
.sll-register-form .sll-social-buttons {
    margin-bottom: 30px;
}

.sll-register-form .sll-form-divider {
    margin: 20px 0 25px 0;
}

/* 全名欄位特殊樣式 */
.sll-form-group input[name="display_name"]:focus {
    background-color: #fff;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}
