/* ============================================================
   MegaForm Widget: E-Signature v2.0
   ============================================================ */
.mfw-sig-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.mfw-sig-label {
    padding: 10px 14px 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* Tabs */
.mfw-sig-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}
.mfw-sig-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: #f9fafb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all .2s;
}
.mfw-sig-tab.active {
    background: #fff;
    color: #4f46e5;
    border-bottom: 2px solid #4f46e5;
}
.mfw-sig-tab:hover:not(.active) {
    background: #f3f4f6;
}

/* Canvas */
.mfw-sig-canvas {
    width: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
    border-bottom: 1px dashed #d1d5db;
}

/* Actions row */
.mfw-sig-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}
.mfw-sig-actions-left {
    display: flex;
    gap: 6px;
}
.mfw-sig-undo,
.mfw-sig-clear {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #6b7280;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all .15s;
}
.mfw-sig-undo:hover {
    background: #f5f3ff;
    border-color: #a5b4fc;
    color: #4f46e5;
}
.mfw-sig-clear:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}
.mfw-sig-ts {
    font-size: 11px;
    color: #10b981;
    font-style: italic;
}

/* Type mode */
.mfw-sig-type-area {
    padding: 16px;
}
.mfw-sig-typed-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.mfw-sig-typed-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

/* Font picker */
.mfw-sig-font-picker {
    display: flex;
    gap: 6px;
    margin: 10px 0;
}
.mfw-sig-font {
    padding: 5px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
}
.mfw-sig-font.active {
    border-color: #4f46e5;
    background: #f5f3ff;
    color: #4f46e5;
    font-weight: 600;
}
.mfw-sig-font:hover:not(.active) {
    background: #f9fafb;
}

/* Preview */
.mfw-sig-typed-preview {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    font-family: 'Dancing Script', 'Brush Script MT', cursive;
    font-size: 40px;
    font-style: italic;
    color: #1a1a2e;
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #fafafa;
    word-break: break-all;
}

/* Responsive */
@media (max-width: 480px) {
    .mfw-sig-typed-preview { font-size: 28px; min-height: 50px; }
    .mfw-sig-font-picker { flex-wrap: wrap; }
    .mfw-sig-actions { flex-wrap: wrap; gap: 6px; }
}
