/**
 * 预览页面样式 - 用户激活管理界面
 *
 * @package ActivationCodes
 * @subpackage Public
 */

/* 全局容器 */
.ac-preview-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* 用户信息卡片 */
.ac-user-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.ac-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.ac-user-info h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.ac-badges {
    display: flex;
    gap: 8px;
}

.ac-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ac-badge.verified {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 标签栏 */
.ac-tabs {
    background: white;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
}

.ac-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.ac-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 激活列表 */
.ac-activation-list {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ac-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ac-list-header h3 {
    font-size: 18px;
    color: #333;
}

.ac-activation-count {
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 激活项 */
.ac-activation-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-activation-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.ac-activation-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #667eea;
}

.ac-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ac-book-cover {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.ac-item-info {
    flex: 1;
}

.ac-book-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ac-activation-code {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.ac-activation-time {
    font-size: 12px;
    color: #999;
}

.ac-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* 按钮样式 */
.ac-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ac-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ac-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ac-btn-danger {
    background: white;
    color: #f44336;
    border: 1px solid #f44336;
}

.ac-btn-danger:hover {
    background: #f44336;
    color: white;
}

.ac-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ac-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ac-btn-secondary:active {
    background: #dee2e6;
    color: #343a40;
    transform: translateY(0);
    box-shadow: none;
}

/* 特定取消按钮样式 */
#ac-cancel-unbind-btn,
.ac-modal-cancel {
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#ac-cancel-unbind-btn::before,
.ac-modal-cancel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#ac-cancel-unbind-btn:active::before,
.ac-modal-cancel:active::before {
    width: 100%;
    height: 100%;
}

/* 操作栏 */
.ac-action-bar {
    margin-top: 20px;
    text-align: center;
}

.ac-action-bar .ac-btn {
    width: auto;
    padding: 12px 24px;
}

/* 空状态 */
.ac-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.ac-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.ac-empty-state h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.ac-empty-state p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* 解绑确认弹窗 */
.ac-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.ac-modal-overlay.show {
    display: flex;
}

.ac-modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ac-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ac-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff3e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.ac-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ac-modal-body {
    margin-bottom: 20px;
}

.ac-modal-book-info {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ac-book-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.ac-code {
    font-size: 13px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.ac-warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ac-warning-title {
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ac-warning-box ul {
    margin-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.ac-modal-actions {
    display: flex;
    gap: 12px;
}

.ac-modal-actions .ac-btn {
    flex: 1;
    padding: 12px;
}

/* 成功提示 */
.ac-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transition: all 0.3s;
}

.ac-toast.show {
    display: flex;
    transform: translateX(-50%) translateY(0);
}

.ac-toast.success {
    border-left: 4px solid #4caf50;
}

.ac-toast-icon {
    font-size: 24px;
}

.ac-toast-message {
    font-size: 14px;
    color: #333;
}

/* 加载状态 */
.ac-loading {
    text-align: center;
    padding: 40px;
}

.ac-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ac-loading p {
    margin-top: 10px;
    color: #666;
}

.ac-error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

/* 响应式 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .ac-preview-container {
        padding: 10px;
    }
    
    .ac-user-card {
        padding: 16px;
    }
    
    .ac-user-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .ac-book-cover {
        width: 50px;
        height: 70px;
    }
    
    .ac-item-actions {
        flex-direction: column;
    }
    
    .ac-item-actions .ac-btn {
        width: 100%;
    }
}