/* Sign PDF tool - signature creation tabs, PDF page previews, and the
   draggable/resizable signature overlay. */

.sig-tab-btn {
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sig-tab-btn:hover {
    background: #e5e7eb;
}

.sig-tab-btn.active {
    background: #1e3a8a;
    color: #fff;
}

.sig-panel.hidden {
    display: none;
}

.sig-draw-canvas {
    width: 100%;
    max-width: 500px;
    height: 160px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
    display: block;
}

.type-font-btn {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 22px;
    color: #1a1a2e;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.type-font-btn:hover {
    border-color: #93c5fd;
}

.type-font-btn.active {
    border-color: #1e3a8a;
    border-width: 2px;
}

#sigReadyNote {
    display: inline-block;
    vertical-align: middle;
}

.pdf-pages-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 16px;
}

.pdf-page-wrap {
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    background: #fff;
    cursor: crosshair;
    flex-shrink: 0;
}

.pdf-page-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.pdf-page-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(17, 24, 39, 0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    pointer-events: none;
}

.sig-overlay {
    position: absolute;
    border: 2px dashed #1e3a8a;
    background: rgba(255, 255, 255, 0.5);
    cursor: move;
    touch-action: none;
    box-sizing: border-box;
}

.sig-overlay-img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    object-fit: contain;
}

.sig-resize-handle {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 14px;
    height: 14px;
    background: #1e3a8a;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: se-resize;
    touch-action: none;
}

@media (max-width: 640px) {
    .pdf-pages-container {
        max-height: 60vh;
    }
}
