/* 二维码打印样式 - 60mm × 40mm */
.qr-print-container {
    position: fixed;
    top: -9999px;
    left: -9999px;
    z-index: -1;
}

.qr-print-content {
    width: 60mm;
    height: 40mm;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2mm;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    border: none;
}

.qr-code-section {
    width: 35mm;
    height: 35mm;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-section canvas {
    width: 32mm !important;
    height: 32mm !important;
}

.barcode-info-section {
    width: 20mm;
    height: 35mm;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.barcode-text {
    font-size: 10pt;
    font-weight: bold;
    color: #000;
    letter-spacing: 1px;
    line-height: 1.1;
    word-break: break-all;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transform: rotate(-90deg);
}

/* 预览弹窗样式 */
.qr-preview-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.7) !important;
    display: none;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    font-family: 'Microsoft YaHei', Arial, sans-serif !important;
}

.qr-preview-modal.show {
    display: flex !important;
}

.qr-preview-content {
    background: white !important;
    border-radius: 15px !important;
    padding: 30px !important;
    max-width: 500px !important;
    width: 95% !important;
    text-align: center !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    position: relative !important;
    z-index: 10000 !important;
}

.qr-preview-title {
    font-size: 1.3em !important;
    margin-bottom: 20px !important;
    color: #495057 !important;
    font-weight: 600 !important;
}

.qr-preview-display {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 30px !important;
    overflow: visible !important;
}

.qr-preview-buttons {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    margin-top: 25px !important;
}

.qr-preview-btn {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 100px !important;
    position: relative !important;
    z-index: 10001 !important;
}

.qr-preview-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
}

.qr-preview-btn.secondary {
    background: #6c757d !important;
    color: white !important;
}

.qr-preview-btn.secondary:hover {
    background: #5a6268 !important;
}

.qr-preview-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3) !important;
}

.qr-preview-btn.primary:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4) !important;
}

/* 打印媒体查询 */
@media print {
    .qr-print-container {
        position: static !important;
        top: auto !important;
        left: auto !important;
        z-index: auto !important;
    }
    
    .qr-print-content {
        width: 60mm;
        height: 40mm;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 2mm;
    }
    
    .qr-code-section canvas {
        width: 32mm !important;
        height: 32mm !important;
    }
    
    .barcode-text {
        font-size: 8pt !important;
    }
    
    /* 隐藏所有其他元素 */
    body * {
        visibility: hidden;
    }
    
    .qr-print-container,
    .qr-print-container * {
        visibility: visible;
    }
    
    /* 隐藏预览弹窗 */
    .qr-preview-modal {
        display: none !important;
    }
}

/* 二维码打印按钮样式 */
.qr-print-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qr-print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.qr-print-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
} 