/* 打印组件管理页面样式 */
.print-component-page {
    padding: 32px;
    background: #ffffff;
    min-height: calc(100vh - 120px);
    border-radius: 8px;
}

/* 页面头部 */
.print-component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.print-component-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.5px;
}

.print-component-refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.print-component-refresh-btn:hover {
    background: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
    transform: translateY(-2px);
}

.print-component-refresh-btn:active {
    transform: translateY(0);
}

.print-component-refresh-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.print-component-refresh-btn:hover svg {
    transform: rotate(180deg);
}

/* 卡片网格布局 */
.print-component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

/* 组件卡片 */
.print-component-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.print-component-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #d9d9d9;
}

/* 卡片头部 */
.print-component-card-header {
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.print-component-logo {
    width: 72px;
    height: 72px;
    background: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.print-component-card:hover .print-component-logo {
    transform: scale(1.05);
}

.print-component-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}

.print-component-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
}

.print-component-subtitle {
    font-size: 13px;
    color: #999;
    margin: 0;
    font-weight: 400;
}

/* 分隔线 */
.print-component-divider {
    width: 100%;
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

/* 表单项 */
.print-component-form-item {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
}

.print-component-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.print-component-input-wrapper {
    position: relative;
    width: 100%;
}

.print-component-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    color: #1a1a1a;
    font-weight: 500;
    text-align: center;
}

.print-component-input:focus {
    border-color: #1890ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.print-component-input:hover {
    border-color: #40a9ff;
}

/* 状态显示 */
.print-component-status {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid;
}

.print-component-status.connected {
    background: #f6ffed;
    border-color: #b7eb8f;
    color: #52c41a;
}

.print-component-status.disconnected {
    background: #fafafa;
    border-color: #d9d9d9;
    color: #999;
}

.print-component-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.print-component-status.connected .print-component-status-dot {
    background: #52c41a;
}

.print-component-status.disconnected .print-component-status-dot {
    background: #d9d9d9;
}

/* 下载按钮 */
.print-component-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.print-component-download-btn:hover {
    background: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
    transform: translateY(-2px);
}

.print-component-download-btn:active {
    transform: translateY(0);
}

.print-component-download-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.print-component-download-btn:hover svg {
    transform: translateY(2px);
}

/* 平台特定颜色主题 - 已移除，改用简洁白色背景 */

/* 响应式布局 */
@media (max-width: 1200px) {
    .print-component-grid {
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .print-component-page {
        padding: 20px 16px;
    }

    .print-component-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .print-component-card {
        padding: 28px 24px;
    }

    .print-component-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 0;
    }

    .print-component-refresh-btn {
        width: 100%;
        justify-content: center;
    }

    .print-component-title {
        font-size: 24px;
    }
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.refreshing {
    animation: spin 1s linear infinite;
}

/* 通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}
