T21: Add PrintPreview.css styling

This commit is contained in:
2026-06-22 23:20:38 +00:00
parent 16ee7bbd7b
commit c9f21ea38d
@@ -0,0 +1,337 @@
.print-preview-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
}
.print-preview-modal {
background: var(--surface, #fff);
border-radius: 8px;
width: 90vw;
max-width: 1100px;
height: 85vh;
max-height: 800px;
display: flex;
flex-direction: column;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
overflow: hidden;
}
.print-preview-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
border-bottom: 1px solid var(--border, #e0e0e0);
flex-shrink: 0;
}
.print-preview-header h2 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: var(--text, #333);
}
.print-preview-close {
background: none;
border: none;
font-size: 20px;
cursor: pointer;
color: var(--text-secondary, #888);
padding: 4px 8px;
border-radius: 4px;
transition: background 0.15s;
}
.print-preview-close:hover {
background: var(--hover, rgba(0,0,0,0.06));
}
.print-preview-body {
display: flex;
flex: 1;
overflow: hidden;
}
/* ── Settings sidebar ────────────────────────────────────────── */
.print-preview-settings {
width: 280px;
flex-shrink: 0;
padding: 12px;
overflow-y: auto;
border-right: 1px solid var(--border, #e0e0e0);
display: flex;
flex-direction: column;
gap: 8px;
}
.print-settings-fieldset {
border: 1px solid var(--border, #e0e0e0);
border-radius: 4px;
padding: 8px;
margin: 0;
}
.print-settings-fieldset legend {
font-weight: 500;
font-size: 12px;
color: var(--text-secondary, #666);
padding: 0 4px;
}
.print-settings-label {
display: flex;
flex-direction: column;
gap: 2px;
margin-bottom: 6px;
font-size: 12px;
color: var(--text-secondary, #666);
}
.print-settings-checkbox-label {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 6px;
font-size: 13px;
color: var(--text, #333);
cursor: pointer;
}
.print-settings-input,
.print-settings-select,
.print-settings-text-input {
width: 100%;
padding: 4px 6px;
border: 1px solid var(--border, #ccc);
border-radius: 4px;
background: var(--background, #fff);
color: var(--text, #333);
font-size: 14px;
box-sizing: border-box;
}
.print-settings-input:focus,
.print-settings-select:focus,
.print-settings-text-input:focus {
outline: none;
border-color: var(--primary, #2563eb);
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.print-settings-select {
cursor: pointer;
}
/* ── Info box ────────────────────────────────────────────────── */
.print-preview-info {
background: var(--surface-hover, rgba(0,0,0,0.04));
border-radius: 4px;
padding: 8px;
font-size: 12px;
}
.print-info-row {
display: flex;
justify-content: space-between;
padding: 2px 0;
color: var(--text-secondary, #666);
}
.print-info-row span:last-child {
font-weight: 500;
color: var(--text, #333);
}
/* ── Preview canvas ──────────────────────────────────────────── */
.print-preview-canvas {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 16px;
overflow: auto;
background: var(--background, #f5f5f5);
}
.print-preview-page-container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.print-preview-page-image {
max-width: 100%;
max-height: 60vh;
border: 1px solid var(--border, #ccc);
background: #fff;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.print-preview-page-label {
font-size: 13px;
color: var(--text-secondary, #666);
}
/* ── Navigation ──────────────────────────────────────────────── */
.print-preview-nav {
display: flex;
align-items: center;
gap: 12px;
margin-top: 12px;
}
.print-preview-nav-btn {
padding: 6px 16px;
border: 1px solid var(--border, #ccc);
border-radius: 4px;
background: var(--surface, #fff);
color: var(--text, #333);
cursor: pointer;
font-size: 13px;
transition: background 0.15s;
}
.print-preview-nav-btn:hover:not(:disabled) {
background: var(--hover, rgba(0,0,0,0.06));
}
.print-preview-nav-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.print-preview-nav-info {
font-size: 13px;
color: var(--text-secondary, #666);
min-width: 60px;
text-align: center;
}
/* ── Page grid ───────────────────────────────────────────────── */
.print-preview-grid {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 12px;
max-width: 300px;
justify-content: center;
}
.print-preview-grid-cell {
width: 32px;
height: 32px;
border: 1px solid var(--border, #ccc);
border-radius: 4px;
background: var(--surface, #fff);
color: var(--text, #333);
cursor: pointer;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s;
}
.print-preview-grid-cell:hover {
background: var(--hover, rgba(0,0,0,0.06));
}
.print-preview-grid-cell.active {
background: var(--primary, #2563eb);
color: #fff;
border-color: var(--primary, #2563eb);
}
/* ── Empty state ─────────────────────────────────────────────── */
.print-preview-empty {
color: var(--text-secondary, #888);
font-size: 14px;
text-align: center;
padding: 40px;
}
/* ── Footer ──────────────────────────────────────────────────── */
.print-preview-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 12px 20px;
border-top: 1px solid var(--border, #e0e0e0);
flex-shrink: 0;
}
.print-preview-btn {
padding: 8px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.15s;
}
.print-preview-btn-secondary {
background: var(--surface, #f0f0f0);
color: var(--text, #333);
}
.print-preview-btn-secondary:hover {
background: var(--hover, rgba(0,0,0,0.08));
}
.print-preview-btn-primary {
background: var(--primary, #2563eb);
color: #fff;
}
.print-preview-btn-primary:hover:not(:disabled) {
opacity: 0.9;
}
.print-preview-btn-primary:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
.print-preview-modal {
width: 95vw;
height: 90vh;
}
.print-preview-body {
flex-direction: column;
}
.print-preview-settings {
width: 100%;
border-right: none;
border-bottom: 1px solid var(--border, #e0e0e0);
max-height: 200px;
}
.print-preview-page-image {
max-height: 40vh;
}
}