/**
 * Typecho Passkey 登录插件样式
 * 
 * @package PasskeyLogin
 * @author Solo Coding
 */

/* 基础样式 */
.passkey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.passkey-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.passkey-card h3 {
    margin: 0 0 15px 0;
    color: #467b96;
    font-size: 18px;
    font-weight: 600;
}

.passkey-card p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
}

/* 按钮样式 */
.passkey-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #467b96 0%, #5a8db3 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(70, 123, 150, 0.3);
}

.passkey-btn:hover {
    background: linear-gradient(135deg, #3a6a85 0%, #4d7ba2 100%);
    box-shadow: 0 4px 8px rgba(70, 123, 150, 0.4);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.passkey-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(70, 123, 150, 0.3);
}

.passkey-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.passkey-btn.loading {
    position: relative;
    color: transparent;
}

.passkey-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 white;
    border-radius: 50%;
    animation: passkey-spin 1s linear infinite;
}

@keyframes passkey-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 登录页面样式 */
.passkey-login-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.passkey-login-section h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

#passkey-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 12px 24px;
    font-size: 15px;
}

#passkey-login-btn::before {
    content: '🔐';
    margin-right: 8px;
    font-size: 16px;
}

/* 设备列表样式 */
.passkey-device-list {
    margin-top: 20px;
}

.passkey-device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.passkey-device-item:hover {
    background: #f1f3f4;
    border-color: #d1d5db;
}

.passkey-device-info {
    flex: 1;
}

.passkey-device-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.passkey-device-meta {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.passkey-device-actions {
    display: flex;
    gap: 8px;
}

.passkey-device-actions .passkey-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

.passkey-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #7d868f 100%);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.passkey-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

.passkey-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e55a6a 100%);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.passkey-btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* 空状态样式 */
.passkey-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.passkey-empty-state .passkey-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.passkey-empty-state h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.passkey-empty-state p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* 统计信息样式 */
.passkey-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.passkey-stat-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.passkey-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #467b96;
    margin-bottom: 8px;
}

.passkey-stat-label {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 配置表单样式 */
.passkey-config-form {
    max-width: 600px;
}

.passkey-form-group {
    margin-bottom: 20px;
}

.passkey-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.passkey-form-group input,
.passkey-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.passkey-form-group input:focus,
.passkey-form-group select:focus {
    outline: none;
    border-color: #467b96;
    box-shadow: 0 0 0 3px rgba(70, 123, 150, 0.1);
}

.passkey-form-help {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* 兼容性检查样式 */
.passkey-compatibility {
    margin-top: 20px;
}

.passkey-compatibility-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.passkey-compatibility-item:last-child {
    border-bottom: none;
}

.passkey-compatibility-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.passkey-compatibility-icon.supported {
    background: #28a745;
}

.passkey-compatibility-icon.not-supported {
    background: #dc3545;
}

.passkey-compatibility-icon.unknown {
    background: #ffc107;
    color: #333;
}

.passkey-compatibility-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .passkey-container {
        padding: 15px;
    }
    
    .passkey-card {
        padding: 15px;
    }
    
    .passkey-device-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .passkey-device-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .passkey-stats {
        grid-template-columns: 1fr;
    }
    
    #passkey-login-btn {
        width: 100%;
        min-width: auto;
    }
}