/* styles.css - Global Styles for PDF Tools */

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Typography --- */
.header { text-align: center; margin-bottom: 20px; }
h1 { color: #1a2533; margin: 0 0 10px 0; font-size: 2em; }
.subtitle { color: #666; font-size: 1.1em; max-width: 800px; margin: 0 auto; }
.section-title, h2, h3 { color: #1a2533; font-weight: 600; margin-bottom: 10px; }
p { line-height: 1.6; color: #555; }

/* --- Links --- */
.back-link {
    display: inline-block;
    margin-bottom: 15px;
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.2s;
}
.back-link:hover { color: #0056b3; }
.back-link::before { content: "← "; }

/* --- Layouts --- */
.main-container {
    display: flex;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    height: calc(100vh - 160px);
    flex: 1;
}

/* Center Card Layout */
.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    margin: 0 auto;
    align-self: center;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Main Viewer Area */
.viewer-container, .organizer-container, .pdf-viewer-container {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 500px;
}

.pdf-viewer-container {
    height: calc(100vh - 240px);
    min-height: 700px;
}

/* --- UI Components --- */

/* Buttons */
button {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    font-size: 1em;
    width: 100%;
}
button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-primary { background-color: #007bff; color: white; }
.btn-primary:hover:not(:disabled) { background-color: #0056b3; }
.btn-success { background-color: #28a745; color: white; }
.btn-success:hover:not(:disabled) { background-color: #218838; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-secondary:hover:not(:disabled) { background-color: #545b62; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-danger:hover:not(:disabled) { background-color: #c82333; }
.btn-outline { background: transparent; border: 2px solid #ddd; color: #555; }
.btn-outline:hover:not(:disabled) { border-color: #007bff; color: #007bff; }

.btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}
.btn-row button { width: auto; }

/* Inputs & Forms */
input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
}
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
}
input[type="color"] {
    width: 100%;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
}
input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.file-input-wrapper, .form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 6px; font-weight: 600; color: #1a2533; }

.control-group { margin-bottom: 15px; }
.control-row { display: flex; gap: 10px; align-items: center; }

/* Status Messages */
.status, .status-msg {
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
    font-style: italic;
    font-size: 0.9em;
}
.status.info, .status-msg.status-info, #status.info { background-color: #e7f3ff; color: #0066cc; }
.status.success, .status-msg.status-success, #status.success { background-color: #d4edda; color: #155724; }
.status.error, .status-msg.status-error, #status.error { background-color: #f8d7da; color: #721c24; }

/* Info Box */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
}
.info-box.warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}
.info-box h3 { margin-top: 0; color: #1a2533; font-size: 1.1em; }
.info-box p { margin: 8px 0; color: #555; line-height: 1.6; }
.info-box strong { color: #1a2533; }
.info-box a { color: #007bff; text-decoration: none; font-weight: 600; }
.info-box a:hover { text-decoration: underline; }

/* PDF Viewer Parts */
.toolbar, .page-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}
.pdf-wrapper, .pdf-canvas-wrapper {
    flex: 1;
    overflow: auto;
    background: #525659;
    border-radius: 8px;
    position: relative;
    display: flex;
    justify-content: center;
    padding: 20px;
}
.canvas-container, .pdf-canvas-container {
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}
.modal-header { font-size: 1.4em; font-weight: 600; margin-bottom: 20px; color: #1a2533; }
.modal-actions, .modal-buttons { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button, .modal-buttons button { flex: 1; margin-bottom: 0; }

/* Steps / Wizard Styles */
.step {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    background-color: #fafafa;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.step.active { border-color: #007bff; background-color: #f0f8ff; }
.step-header { display: flex; align-items: center; margin-bottom: 10px; }
.step-number {
    background-color: #007bff; color: white;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; margin-right: 10px; flex-shrink: 0;
}
.step-title { font-weight: 600; color: #1a2533; }
.step.collapsed .step-content { display: none; }
.step.collapsed .step-header { margin-bottom: 0; }

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 15px;
    background: #f1f3f5;
    padding: 4px;
    border-radius: 8px;
}
.tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    color: #666;
    transition: all 0.2s;
}
.tab.active {
    background: white;
    color: #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #888;
    margin-top: auto;
}

/* --- PDF Organizer Specifics --- */
.action-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.action-group:last-child {
    border-bottom: none;
    margin-top: auto;
    padding-bottom: 0;
    margin-bottom: 0;
}
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}
.page-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    cursor: move;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.page-card.dragging { opacity: 0.5; border: 2px dashed #007bff; }
.page-card.drag-over { border: 2px solid #28a745; transform: scale(1.02); }

.thumbnail-wrapper {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #eee;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
}
.thumbnail-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.page-number {
    position: absolute;
    top: 5px; left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}
.card-controls { display: flex; gap: 8px; width: 100%; justify-content: center; }
.icon-btn {
    background: #f1f3f5;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #495057;
    font-size: 1.1em;
    transition: all 0.2s;
}
.icon-btn:hover { background: #e9ecef; color: #007bff; }
.icon-btn.delete:hover { background: #ffe3e3; color: #e03131; }
.history-controls { display: flex; gap: 10px; }
.history-controls button { flex: 1; }
#emptyState {
    height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #aaa; text-align: center;
}

/* --- Watermarker Specifics --- */
.watermark-element {
    position: absolute;
    cursor: move;
    user-select: none;
    border: 2px solid transparent;
    transform-origin: center center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; white-space: nowrap;
}
.watermark-element:hover { border: 1px dashed #007bff; }
.watermark-element.selected { border: 2px solid #007bff; z-index: 1000; }
.watermark-element img { width: 100%; height: 100%; pointer-events: none; display: block; }
.delete-btn, .delete-btn-wm, .placed-sig-delete {
    position: absolute;
    top: -12px; right: -12px;
    width: 24px; height: 24px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
}
.watermark-element.selected .delete-btn, .placed-signature:hover .placed-sig-delete, .placed-signature.selected .placed-sig-delete { display: flex; }
.file-upload-btn {
    border: 2px dashed #ddd;
    padding: 15px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
    color: #666;
    font-weight: 600;
    font-size: 0.9em;
}
.file-upload-btn:hover { border-color: #007bff; color: #007bff; }
#activeSettings {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}
.range-value { font-size: 0.85em; color: #666; width: 40px; text-align: right; }

/* --- Sign PDF Specifics --- */
.sidebar-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
}
.sidebar-title { font-weight: 600; font-size: 1.1em; }
.add-sig-btn {
    background-color: #007bff; color: white;
    border: none; border-radius: 6px;
    padding: 5px 10px; font-size: 0.9em;
    cursor: pointer; font-weight: 600; width: auto;
}
.add-sig-btn:hover { background-color: #0056b3; }
.signatures-list {
    flex: 1; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
}
.signature-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    position: relative;
    background: white;
    transition: border-color 0.2s;
}
.signature-item:hover { border-color: #007bff; }
.signature-item img { max-width: 100%; max-height: 80px; display: block; margin: 0 auto; }
.signature-item .delete-btn { display: block; background: rgba(255,255,255,0.8); top: 5px; right: 5px; color: #dc3545; }
.action-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }

.placed-signature {
    position: absolute;
    border: 1px dashed #007bff;
    cursor: move;
    z-index: 100;
}
.placed-signature img { width: 100%; height: 100%; pointer-events: none; }
.placed-signature.selected { border: 2px solid #007bff; }
.resize-handle {
    position: absolute;
    width: 12px; height: 12px;
    background-color: #007bff;
    border: 2px solid white;
    border-radius: 50%;
    bottom: -6px; right: -6px;
    cursor: se-resize;
    display: none;
}
.placed-signature:hover .resize-handle, .placed-signature.selected .resize-handle { display: block; }

.signature-pad-wrapper {
    border: 2px solid #ddd;
    border-radius: 8px;
    height: 200px;
    margin-bottom: 15px;
    position: relative;
    background-color: #fff;
}
canvas#signaturePad { width: 100%; height: 100%; cursor: crosshair; }
.tab-buttons { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.tab-btn {
    background: none; border: none; padding: 5px 10px;
    cursor: pointer; font-weight: 600; color: #666;
    border-bottom: 2px solid transparent; width: auto;
}
.tab-btn.active { color: #007bff; border-bottom-color: #007bff; }

/* --- Flat PDF & Field Mapper Specifics --- */
.drawing-layer {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10; cursor: crosshair;
}
.drawn-box {
    position: absolute;
    border: 2px solid #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    z-index: 20;
    cursor: pointer;
    display: flex; align-items: center;
}
.drawn-box:hover { background-color: rgba(0, 123, 255, 0.2); border-width: 2px; }
.drawn-box.selected { border-color: #28a745; background-color: rgba(40, 167, 69, 0.2); z-index: 30; }
.box-preview-text {
    pointer-events: none; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; padding-left: 2px; color: #000; width: 100%;
}
.box-controls {
    position: absolute; top: -24px; right: 0;
    display: none; gap: 2px; z-index: 40;
}
.drawn-box.selected .box-controls { display: flex; }
.control-btn {
    width: 20px; height: 20px;
    background: #fff; border: 1px solid #999;
    border-radius: 3px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer; color: #333;
}
.control-btn:hover { background: #eee; }
.control-btn.delete { color: #dc3545; border-color: #dc3545; }
.control-btn.edit { color: #007bff; border-color: #007bff; }
.control-btn.move { color: #666; border-color: #666; cursor: move; }
.drag-box {
    position: absolute; border: 2px dashed #ffc107;
    background-color: rgba(255, 193, 7, 0.2);
    z-index: 15; pointer-events: none;
}
.field-list { margin-top: 15px; max-height: 300px; overflow-y: auto; }
.field-item {
    background: #fff; border: 1px solid #eee;
    padding: 10px; margin-bottom: 5px;
    border-radius: 6px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
}
.field-item:hover { border-color: #007bff; }
.field-item.selected { border-color: #28a745; background-color: #f0fff4; }
.field-item .remove-btn { color: #dc3545; cursor: pointer; padding: 0 5px; font-weight: bold; }

/* Field Mapper */
.progress-section {
    margin-bottom: 20px; padding: 15px;
    background-color: #f8f9fa; border-radius: 8px;
    border-left: 4px solid #007bff; flex-shrink: 0;
}
.progress-header { font-weight: 600; margin-bottom: 10px; color: #1a2533; }
.progress-bar-container {
    background-color: #e0e0e0; border-radius: 10px;
    height: 24px; overflow: hidden; margin-bottom: 10px;
}
.progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
    height: 100%; transition: width 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.85em; font-weight: 600;
}
.progress-text { font-size: 0.9em; color: #555; }
.legend { margin-bottom: 20px; flex-shrink: 0; }
.legend-title { font-weight: 600; margin-bottom: 10px; color: #1a2533; }
.legend-item { display: flex; align-items: center; margin-bottom: 8px; font-size: 0.9em; }
.legend-color {
    width: 20px; height: 20px; border-radius: 4px;
    margin-right: 10px; border: 2px solid #333;
}
.color-unmapped { background-color: rgba(255, 193, 7, 0.3); border-color: #ffc107; }
.color-mapped { background-color: rgba(40, 167, 69, 0.3); border-color: #28a745; }
.color-selected { background-color: rgba(0, 123, 255, 0.3); border-color: #007bff; }

.fields-list { flex: 1; overflow-y: auto; margin-bottom: 15px; min-height: 200px; }
.fields-list::-webkit-scrollbar { width: 8px; }
.fields-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.fields-list::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
.fields-list::-webkit-scrollbar-thumb:hover { background: #555; }
.field-name { font-size: 0.85em; color: #666; margin-bottom: 4px; }
.field-label { font-weight: 600; color: #1a2533; }
.field-type { font-size: 0.8em; color: #888; margin-top: 4px; }
.field-overlay {
    position: absolute; border: 3px solid; cursor: pointer;
    transition: all 0.2s; z-index: 10;
}
.field-overlay:hover { opacity: 0.8; transform: scale(1.02); }
.field-overlay.unmapped { background-color: rgba(255, 193, 7, 0.3); border-color: #ffc107; }
.field-overlay.mapped { background-color: rgba(40, 167, 69, 0.3); border-color: #28a745; }
.field-overlay.selected {
    background-color: rgba(0, 123, 255, 0.4); border-color: #007bff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.6);
}
.modal-field-info {
    background-color: #f8f9fa; padding: 15px; border-radius: 6px; margin-bottom: 20px;
}
.modal-field-info p { margin: 5px 0; font-size: 0.9em; }
.modal-field-info strong { color: #1a2533; }

.template-structure {
    background-color: #f8f9fa; padding: 15px; border-radius: 6px;
    margin-top: 10px; font-family: 'Courier New', monospace; font-size: 0.9em;
}
.template-structure p { margin: 5px 0; }
.links-container a { display: inline-block; margin-right: 15px; text-decoration: none; color: #007bff; font-weight: 600; }
.links-container a:hover { text-decoration: underline; }

/* --- Image Converter Specifics --- */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 20px;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding: 10px;
}
.image-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.image-card img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}
.image-info {
    font-size: 0.8em;
    color: #666;
    text-align: center;
    word-break: break-all;
    margin-top: auto;
}
.remove-img-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid white;
}
.settings-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

/* --- Image Compressor Specifics --- */
.compression-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.compression-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

.item-details {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    color: #1a2533;
}

.item-stats {
    font-size: 0.85em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-pill {
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.stat-pill.success {
    background: #d4edda;
    color: #155724;
    font-weight: 600;
}

.item-actions {
    display: flex;
    gap: 8px;
}

/* Comparison Modal Specifics */
.compare-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Max width for the modal content */
    height: 500px; /* Fixed height for comparison area */
    background: #eee;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 auto;
    user-select: none;
}

.compare-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
}

.img-after {
    /* Default layer */
}

.img-before-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 50%; /* Initial split */
    height: 100%;
    overflow: hidden;
    border-right: 2px solid white;
    background: #eee;
    z-index: 10;
}

.img-before {
    position: absolute;
    top: 0; left: 0;
    /* Must match parent dimensions precisely to align */
    height: 100%;
    /* We set width via JS to match container width */
    object-fit: contain; 
    object-position: center;
}

.compare-slider-handle {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 40px;
    margin-left: -20px;
    z-index: 20;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.handle-circle {
    width: 40px; height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    color: #007bff;
    font-weight: bold;
}

.compare-label {
    position: absolute;
    bottom: 10px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 4px;
    font-size: 0.8em;
    pointer-events: none;
    z-index: 15;
}
.label-before { left: 10px; }
.label-after { right: 10px; }
