/* Signature Capture CSS - PR School Manager */

:root {
    --sig-primary: #0284c7;
    --sig-primary-hover: #0369a1;
    --sig-border: #cbd5e1;
    --sig-bg: #f8fafc;
    --sig-dark: #0f172a;
}

.signature-card {
    border-color: #0ea5e9 !important;
}

.signature-card-header {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
}

/* Signature Preview image */
.sig-pic-preview {
    max-width: 250px;
    height: 80px;
    object-fit: contain;
    border: 2px dashed var(--sig-border);
    border-radius: 8px;
    background-color: #ffffff;
    padding: 5px;
    display: block;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.sig-pic-preview.has-sig {
    border-style: solid;
    border-color: var(--sig-primary);
}

.sig-wrapper {
    position: relative;
    display: inline-block;
}

/* Canvas Area */
.sig-canvas-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 200px;
    background-color: #ffffff;
    border: 2px solid var(--sig-border);
    border-radius: 12px;
    overflow: hidden;
    touch-action: none;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    margin: 0 auto 15px;
    transition: border-color 0.2s ease;
}

.sig-canvas-container:focus-within,
.sig-canvas-container:hover {
    border-color: var(--sig-primary);
}

.sig-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    display: block;
}

/* Webcam Interface */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 270px;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 15px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Guides on camera viewport to align signatures */
.camera-guide-overlay {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 80%;
    height: 70%;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    pointer-events: none;
    box-sizing: border-box;
}

.camera-guide-overlay::after {
    content: "Align Signature Inside Guide";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Modal Controls */
.modal-sig-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.sig-brush-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--sig-dark);
    transform: scale(1.15);
}

.color-black { background-color: #000000; }
.color-blue { background-color: #0000ff; }

/* Image Binarization Adjuster */
.threshold-adjuster {
    background-color: var(--sig-bg);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--sig-border);
}

.threshold-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.threshold-slider {
    flex-grow: 1;
    cursor: pointer;
}

/* Tab Navigation Style */
.sig-nav-tabs .nav-link {
    font-weight: 600;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.sig-nav-tabs .nav-link:hover {
    color: var(--sig-primary);
    background: transparent;
}

.sig-nav-tabs .nav-link.active {
    color: var(--sig-primary) !important;
    background: transparent !important;
    border-bottom-color: var(--sig-primary) !important;
}
